Compartilhar via


IVsSymbolicNavigationManager Interface

Manages the list of IVsSymbolicNavigationNotify handlers that are registered on a project-scoped basis. Obtain an IVsSymbolicNavigationManager interface by calling QueryService for the SVsSymbolicNavigationManager service.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)

Syntax

'Declaration
<GuidAttribute("C4D4F197-941E-43B1-9D42-BE527F9D5D00")> _
<InterfaceTypeAttribute()> _
Public Interface IVsSymbolicNavigationManager
[GuidAttribute("C4D4F197-941E-43B1-9D42-BE527F9D5D00")]
[InterfaceTypeAttribute()]
public interface IVsSymbolicNavigationManager
[GuidAttribute(L"C4D4F197-941E-43B1-9D42-BE527F9D5D00")]
[InterfaceTypeAttribute()]
public interface class IVsSymbolicNavigationManager
[<GuidAttribute("C4D4F197-941E-43B1-9D42-BE527F9D5D00")>]
[<InterfaceTypeAttribute()>]
type IVsSymbolicNavigationManager =  interface end
public interface IVsSymbolicNavigationManager

The IVsSymbolicNavigationManager type exposes the following members.

Methods

  Name Description
Public method OnBeforeNavigateToSymbol Determines if there is an alternative source file to navigate to for a code symbol (a Goto Definition operation).
Public method QueryNavigateToSymbol Retrieves the alternative navigation target for the symbol if there is one (this method does not do the actual navigation).
Public method RegisterSymbolicNavigationNotify Registers the symbolic navigation notify implementation in the project.
Public method UnregisterSymbolicNavigationNotify Unregisters the symbolic navigation notify implementation.

Top

Remarks

The language service of a code language should call OnBeforeNavigateToSymbol on this service before performing a "Goto Definition" type of navigation to a symbol in code. This allows an advanced code generator system to overtake the normal navigation, and instead causes the navigation to the definition of the symbol in the source document that generated the code definition (for example, an XAML file).

IVsSymbolicNavigationManager will loop through all of the registered objects and call OnBeforeNavigateToSymbol and QueryNavigateToSymbol until the first one returns that it handled the symbol. The order of these calls is undefined. It is expected that implementations of these methods will be able to quickly respond false for files they do not care about based on checking the naming pattern (file extension) of the input code file. Further quick checks should be able to be made if the input IVsHierarchy is supported.

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace