コード例 #1
0
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     if (_findTarget != null)
     {
         return(_findTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage));
     }
     ppTextImage = null;
     return(VSConstants.E_NOTIMPL);
 }
コード例 #2
0
        int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
        {
            IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget;

            if (findTarget != null)
            {
                return(findTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage));
            }
            ppTextImage = null;
            return(VSConstants.E_NOTIMPL);
        }
コード例 #3
0
ファイル: EditorPane.cs プロジェクト: 569550384/Rafy
        /// <summary>
        /// 
        /// </summary>
        /// <param name="grfOptions"></param>
        /// <param name="ppSpans"></param>
        /// <param name="ppTextImage"></param>
        int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
        {
            throw new NotImplementedException();//huqf
            ////set the IVsTextSpanSet object
            //if (null != ppSpans && ppSpans.Length > 0)
            //{
            //    ppSpans[0] = (IVsTextSpanSet)this;
            //}

            ////set the IVsTextImage object
            //ppTextImage = (IVsTextImage)this;

            ////attach this text image to the span
            //if (null != ppSpans && ppSpans.Length > 0)
            //{
            //    ErrorHandler.ThrowOnFailure(ppSpans[0].AttachTextImage(ppTextImage));
            //}

            //return VSConstants.S_OK;
        }
コード例 #4
0
        /// <summary>
        /// To Release a text image
        /// </summary>
        /// <returns></returns>
        int IVsTextSpanSet.Detach()
        {
            spTextImage = null;
            textSpanArray.RemoveRange(0, textSpanArray.Count);

            return VSConstants.S_OK;
        }
コード例 #5
0
        /// <summary>
        /// The environment uses this to get a text image
        /// </summary>
        /// <param name="pText">Pointer to the text image</param>
        /// <returns></returns>
        int IVsTextSpanSet.AttachTextImage(object pText)
        {
            if (null == pText)
                return VSConstants.E_INVALIDARG;

            if (null != spTextImage)
            {
                if (spTextImage.Equals(pText))
                    return VSConstants.S_OK;
            }

            spTextImage = (IVsTextImage)this;

            //get the number of lines in the Text Image
            int lineCount = 0;
            ErrorHandler.ThrowOnFailure(spTextImage.GetLineSize(out lineCount));

            //create a text span for the entire text image
            TextSpan textSpan = new TextSpan();
            textSpan.iStartLine = 0;
            textSpan.iStartIndex = 0;
            textSpan.iEndLine = 0;

            //get the length of the last line
            int lastLineLength = 0;
            if (lineCount > 0)
            {
                textSpan.iEndLine = lineCount - 1;
                ErrorHandler.ThrowOnFailure(spTextImage.GetLineLength(lineCount - 1, out lastLineLength));
            }

            //set the end index corresponding to the last line length
            textSpan.iEndIndex = lastLineLength;

            //add it to the text span array
            textSpanArray.Add(textSpan);

            return VSConstants.S_OK;
        }
コード例 #6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="grfOptions"></param>
        /// <param name="ppSpans"></param>
        /// <param name="ppTextImage"></param>
        int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
        {
            //set the IVsTextSpanSet object
            if (null != ppSpans && ppSpans.Length > 0)
            {
                ppSpans[0] = (IVsTextSpanSet)this;
            }

            //set the IVsTextImage object
            ppTextImage = (IVsTextImage)this;

            //attach this text image to the span
            if (null != ppSpans && ppSpans.Length > 0)
            {
                ErrorHandler.ThrowOnFailure(ppSpans[0].AttachTextImage(ppTextImage));
            }

            return VSConstants.S_OK;
        }
コード例 #7
0
ファイル: EditorHostPane.cs プロジェクト: netcore3/AvaloniaVS
 int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage) => ((IVsFindTarget)_editorWindow).GetSearchImage(grfOptions, ppSpans, out ppTextImage);
コード例 #8
0
ファイル: SQLEditor.cs プロジェクト: biegomar/nuodb-dotnet
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     return (CommandWindow.VsCodeWindow as IVsFindTarget).GetSearchImage(grfOptions, ppSpans, out ppTextImage);
 }
コード例 #9
0
ファイル: BaseEditor.cs プロジェクト: tdhieu/openvss
 /// <summary>
 /// Not implemented.
 /// We don't need this function since we implement Find and Replace
 /// </summary>
 /// <param name="grfOptions"></param>
 /// <param name="ppSpans"></param>
 /// <param name="ppTextImage"></param>
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     ppTextImage = null;
     return VSConstants.E_NOTIMPL; // "GetSearchImage is not implemented, Find and Replace should be used instead"
 }
コード例 #10
0
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     var findTarget = (IVsFindTarget)_vsCodeWindow;
     return findTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage);
 }
コード例 #11
0
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     ppTextImage = null;
     return EditorFindTarget == null ? 0
            : EditorFindTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage);
 }
コード例 #12
0
        public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
        {
            var findTarget = (IVsFindTarget)_vsCodeWindow;

            return(findTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage));
        }
コード例 #13
0
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     return((CommandWindow.VsCodeWindow as IVsFindTarget).GetSearchImage(grfOptions, ppSpans, out ppTextImage));
 }
コード例 #14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="grfOptions"></param>
 /// <param name="ppSpans"></param>
 /// <param name="ppTextImage"></param>
 int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     return(((IVsFindTarget)_subCodeWindow).GetSearchImage(grfOptions, ppSpans, out ppTextImage));
 }
コード例 #15
0
 int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     ppTextImage = null;
     try
     {
         ppTextImage = GetTextImage();
     }
     catch { }
     return ppTextImage == null ? VSConstants.E_NOTIMPL : VSConstants.S_OK;
 }
コード例 #16
0
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     return(EditorFindTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage));
 }
コード例 #17
0
 /// <summary>
 /// Not implemented.
 /// We don't need this function since we implement Find and Replace
 /// </summary>
 /// <param name="grfOptions"></param>
 /// <param name="ppSpans"></param>
 /// <param name="ppTextImage"></param>
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     ppTextImage = null;
     return(VSConstants.E_NOTIMPL); // "GetSearchImage is not implemented, Find and Replace should be used instead"
 }
コード例 #18
0
 public int GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage)
 {
     if (_findTarget != null)
     {
         return _findTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage);
     }
     ppTextImage = null;
     return VSConstants.E_NOTIMPL;
 }