IVsSimpleObjectList2::CanGoToSource Method (UInt32, VSOBJGOTOSRCTYPE, Int32)

 

Returns a flag indicating if navigation to the given list item's source is supported.

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

int CanGoToSource(
	unsigned int index,
	VSOBJGOTOSRCTYPE SrcType,
	[OutAttribute] int% pfOK
)

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.

pfOK
Type: System::Int32

[out] Pointer to a flag indicating whether navigation is supported.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell80.idl:

HRESULT IVsSimpleObjectList2::CanGoToSource(
   [in] ULONG            Index, 
   [in] VSOBJGOTOSRCTYPE SrcType, 
   [out] BOOL*           pfOK
);

Returns true in pfOK if navigation to the source of the specified type (definition, declaration, or reference), is possible, false otherwise. This is what enables the GoToDefinition, GoToDeclaration, and GoToReference commands in the UI. Most languages do not have a separate declaration from the definition.

Return to top
Show: