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.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
Public Overridable Function GetMarkerCommandInfo ( _
    region As IVsHiddenRegion, _
    item As Integer, _
    outText As String(), _
    flags As UInteger() _
) As Integer
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

  • item
    Type: Int32

    A value from the MarkerCommandValues enumeration specifying the command to examine.

  • outText
    Type: array<String[]

    [out] Returns the string to show on the context menu if the specified command is supported.

  • flags
    Type: array<UInt32[]

    [out] Returns a set of flags from the OLECMDF enumeration indicating whether the command is supported.

Return Value

Type: 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

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace