Freigeben über


ITextStructureNavigator Interface

Definition

Provides methods to navigate text, such as getting word extents.

public interface class ITextStructureNavigator
public interface class ITextStructureNavigator
__interface ITextStructureNavigator
public interface ITextStructureNavigator
type ITextStructureNavigator = interface
Public Interface ITextStructureNavigator

Examples

For an example of how to use the navigator and the navigator provider to get word extents, see Walkthrough: Displaying SmartTags.

Remarks

Implement this interface if you need to provide a special definition of a word extent in your language or content type, or if you need to define a special relationship between sibling or parent/child syntactic elements. To use it in your extension, you must also implement (in a separate class) the ITextStructureNavigatorProvider so that it creates a navigator of your type, and export this class for your content type. In this case the ITextStructureNavigatorSelectorService will assign your navigator to buffers that have the correct content type.

Properties

ContentType

Gets the content type that this navigator supports.

Methods

GetExtentOfWord(SnapshotPoint)

Gets the extent of the word at the given position.

GetSpanOfEnclosing(SnapshotSpan)

Gets the span of the enclosing syntactic element of the specified snapshot span.

GetSpanOfFirstChild(SnapshotSpan)

Gets the span of the first child syntactic element of the specified snapshot span. If the snapshot span has zero length, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).

GetSpanOfNextSibling(SnapshotSpan)

Gets the span of the next sibling syntactic element of the specified snapshot span. If the snapshot span has zero length, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).

GetSpanOfPreviousSibling(SnapshotSpan)

Gets the span of the previous sibling syntactic element of the specified snapshot span. If the specified span has zero length, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).

Applies to