Source.GetMarkerCommandInfo Method
Determines which marker commands can be shown on a context menu for the specified hidden region.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
'Dichiarazione
Public Overridable Function GetMarkerCommandInfo ( _
region As IVsHiddenRegion, _
item As Integer, _
outText As String(), _
flags As UInteger() _
) As Integer
'Utilizzo
Dim instance As Source
Dim region As IVsHiddenRegion
Dim item As Integer
Dim outText As String()
Dim flags As UInteger()
Dim returnValue As Integer
returnValue = instance.GetMarkerCommandInfo(region, _
item, outText, flags)
public virtual int GetMarkerCommandInfo(
IVsHiddenRegion region,
int item,
string[] outText,
uint[] flags
)
public:
virtual int GetMarkerCommandInfo(
IVsHiddenRegion^ region,
int item,
array<String^>^ outText,
array<unsigned int>^ flags
)
abstract GetMarkerCommandInfo :
region:IVsHiddenRegion *
item:int *
outText:string[] *
flags:uint32[] -> int
override GetMarkerCommandInfo :
region:IVsHiddenRegion *
item:int *
outText:string[] *
flags:uint32[] -> int
public function GetMarkerCommandInfo(
region : IVsHiddenRegion,
item : int,
outText : String[],
flags : uint[]
) : int
Parameters
- region
Type: Microsoft.VisualStudio.TextManager.Interop.IVsHiddenRegion
An IVsHiddenRegion object describing the hidden region.
- item
Type: System.Int32
A value from the MarkerCommandValues enumeration specifying the command to examine.
- outText
Type: array<System.String[]
[out] Returns the string to show on the context menu if the specified command is supported.
- flags
Type: array<System.UInt32[]
[out] Returns a set of flags from the OLECMDF enumeration indicating whether the command is supported.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code. If support for commands on a hidden region is not needed, return E_NOTIMPL.
Implements
IVsHiddenTextClient.GetMarkerCommandInfo(IVsHiddenRegion, Int32, array<String[], array<UInt32[])
Remarks
When a user right-clicks on a hidden region marker, a context menu is displayed. This method is called for all commands in the MarkerCommandValues enumeration and it is this method that decides whether the command is supported. If a command is supported, the returned string is used as the command name on the context menu and the command is added to the top of the menu. If there are multiple markers at the cursor position, the markers are examined in order of priority until a marker claims support for a command (this means lower priority markers that might support the command are ignored). When the user selects a command from the context menu, ExecMarkerCommand is called to execute the command.
The base method always returns E_NOTIMPL.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.