IVsSimpleObjectList2::GoToSource Method (UInt32, VSOBJGOTOSRCTYPE)
Visual Studio 2015
Navigates to the source for the given list item.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Parameters
- index
-
Type:
System::UInt32
[in] Specifies the index of the list item of interest.
- SrcType
-
Type:
Microsoft.VisualStudio.Shell.Interop::VSOBJGOTOSRCTYPE
[in] Specifies the source type. Values are taken from the VSOBJGOTOSRCTYPE enumeration.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell80.idl:
HRESULT IVsSimpleObjectList2::GoToSource( [in] ULONG Index, [in] VSOBJGOTOSRCTYPE SrcType );
This method handles the GoToDeclaration and GoToReference commands provided CanGoToSource returned true. You must navigate to the source for the item, coordinating with your project system, the running document table, and the text editor to actually open the containing source file and navigate to the appropriate line. Also open the appropriate editor's navigation context so that the editor's back/forward navigation functions correctly.
Show: