Partager via


ITextStructureNavigatorProvider Interface

Gets an ITextStructureNavigator for a given ITextBuffer.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Public Interface ITextStructureNavigatorProvider
public interface ITextStructureNavigatorProvider
public interface class ITextStructureNavigatorProvider
type ITextStructureNavigatorProvider =  interface end
public interface ITextStructureNavigatorProvider

The ITextStructureNavigatorProvider type exposes the following members.

Methods

  Name Description
Public method CreateTextStructureNavigator Creates a new ITextStructureNavigator for the specified ITextBuffer.

Top

Remarks

This is a MEF component part, and should be exported with the following attribute:

[Export(NameSource=typeof(ITextStructureNavigatorProvider))]

You must supply at least one ContentTypeAttribute to specify the applicable content types.

Use this provider when you have implemented a ITextStructureNavigator for your content or language, so that the provider creates the right type of navigator. You can import the ITextStructureNavigatorSelectorService to get a navigator for a particular content type.

Examples

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

See Also

Reference

Microsoft.VisualStudio.Text.Operations Namespace