TokenTriggers Enumeration

TokenTriggers Enumeration

 

Specifies a set of triggers that can be fired from an IScanner language parser.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

[FlagsAttribute]
public enum TokenTriggers

Member nameDescription
MatchBraces

The opening or closing part of a language pair has been parsed. For example, in C#, a { or } has been parsed. In XML, a < or > has been parsed.

MemberSelect

A character that indicates that the start of a member selection has been parsed. In C#, this could be a period following a class name. In XML, this could be a < (the member select is a list of possible tags).

MethodTip

This is a mask for the flags used to govern the IntelliSense Method Tip operation. This mask is used to isolate the values Parameter, ParameterStart, ParameterNext, and ParameterEnd.

None

Used when no triggers are set. This is the default.

Parameter

A parameter in a method's parameter list has been parsed.

ParameterEnd

A character that marks the end of a parameter list has been parsed. For example, in C#, this could be a close parenthesis, ")".

ParameterNext

A character that separates parameters in a list has been parsed. For example, in C#, this could be a comma, ",".

ParameterStart

A character that marks the start of a parameter list has been parsed. For example, in C#, this could be an open parenthesis, "(".

Triggers provide a way for the language service's IScanner scanner to signal the caller about certain language elements that may be of interest to IntelliSense support. These triggers can be returned all the time; however, they are used only in certain parsing operation contexts (see the ParseReason enumeration for more information about the different types of parsing operations).

For example, the user types a closing brace and the scanner is called to examine the line the brace is on. The brace is parsed and the scanner sets the trigger for that token to MatchBraces. The caller sees this trigger and calls the ParseSource method parser with the parse reason HighlightBraces. This causes the parser to look for the matching opening brace and return the location of both braces. The editor can then highlight the two braces.

Return to top
Show:
© 2016 Microsoft