Udostępnij za pośrednictwem


IVsFinder Interface

Definition

Finds a text image.

public interface class IVsFinder
public interface class IVsFinder
__interface IVsFinder
[System.Runtime.InteropServices.Guid("D0C79C30-C06A-11D2-936C-D714766E8B50")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsFinder
[System.Runtime.InteropServices.Guid("D0C79C30-C06A-11D2-936C-D714766E8B50")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsFinder
[<System.Runtime.InteropServices.Guid("D0C79C30-C06A-11D2-936C-D714766E8B50")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsFinder = interface
[<System.Runtime.InteropServices.Guid("D0C79C30-C06A-11D2-936C-D714766E8B50")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsFinder = interface
Public Interface IVsFinder
Derived
Attributes

Remarks

To acquire a text image:

  • QueryInterface a shell's text buffer for an IVsTextImage.

  • Use the text image implementations available through TxFactory.h.

To search an image using the finder:

  • AttachTextImage the image to search.

  • Init with the search pattern and options.

  • SetScope (optional) to limit the search to a subset of the image. This can be a number of non-contiguous regions of the image.

  • SetPosition to set the starting and/or current positions and the wrapped state of search.

  • Find.

The finder has no knowledge of hidden text (FR_Hidden). Searching only non-hidden text must be implemented by setting a span set of the visible regions. "Try match" means to test for a match at the specified position without scanning. To get a match set or a regex tag set after a find, you must pass VSFH_SetMatch. If you do not need a match set or tag set, it is more efficient to NOT pass VSFH_SetMatch.

Notes to Implementers

Implemented by the environment. Instances available through the environment's global service provider.

Methods

AttachTextImage(Object)

Attaches a text image.

Detach()

Detaches a text image.

Find(UInt32, TextSpan[], UInt32)

Finds a text image within a text span.

GetMatch(TextSpan[])

Gets a textspan match.

GetMatchedSpans(IVsTextSpanSet)

Gets matched textspans.

GetState(Int32, UInt32, UInt32)

Gets state.

GetTaggedSpans(IVsTextSpanSet)

Returns tagged textspans.

Init(UInt32, String, Int32, UInt32)

Sets the find string.

SetPosition(UInt32, TextAddress)

Sets search positions

SetScope(IVsTextSpanSet)

Restricts search to the span set.

Applies to