Saturday, October 26, 2013

VS Classification Type Names

If you're programming a syntax highlighting extension for Visual Studio, of course you'll want to use some of the pre-existing classification names in your language. You can use the IClassificationTypeRegistryService passed to the constructor of your IClassifier class to get an existing classification by name, but there does not seem to be any API to get a list of all the existing token types. Some, but not all, of the names are available in PredefinedClassificationTypeNames, which is a class in the Microsoft.VisualStudio.Language.StandardClassification assembly.

To get the other names, I inspected the registry object within the debugger and was able to get the following list. Strangely, however, I don't see anything that might correspond to "C# @verbatim" or (what I was really looking for) "Brace matching", which I wanted to use to make Sam's Brace Matching Tagger work properly.
CSS Comment
CSS Keyword
CSS Selector
CSS Property Name
CSS Property Value
CSS String Value
XML Doc Comment
formal language
XML Doc Tag
C/C++ User Keywords
CppInactiveCodeClassification
CppSolidColorClassification
excluded code
cppMacro
cppEnumerator
cppGlobalVariable
cppLocalVariable
cppParameter
cppType
cppRefType
cppValueType
cppFunction
cppMemberFunction
cppMemberField
cppStaticMemberFunction
cppStaticMemberField
cppProperty
cppEvent
cppClassTemplate
cppGenericType
cppFunctionTemplate
cppNamespace
cppLabel
HtmlServerCodeBlockContent
Razor Code
RegularExpression
VB XML Doc Tag
VB XML Doc Attribute
VB XML Doc Comment
VB XML Delimiter
VB XML Comment
VB XML Name
VB XML Attribute Name
VB XML CData Section
VB XML Processing Instruction
VB XML Attribute Value
VB XML Attribute Quotes
VB XML Text
VB XML Embedded Expression
VB User Types
VB Excluded Code
CoffeeScriptRawJavaScript
CoffeeScriptHeRegExSeparator
HtmlClientTemplateSeparator
HtmlClientTemplateTag
HtmlClientTemplateValue
LessCssVariableDeclaration
LessCssVariableReference
LessCssNamespaceReference
LessCssMixinDeclaration
LessCssMixinReference
LessCssKeyword
HTML Attribute Name
HTML Attribute Value
HTML Comment
HTML Element Name
HTML Entity
HTML Operator
HTML Server-Side Script
HTML Tag Delimiter
HTML Priority Workaround
VBScript Keyword
VBScript Comment
VBScript Operator
VBScript Number
VBScript String
VBScript Identifier
VBScript Function Block Start
biDiNeutral
text
quickinfo-bold
MarkerPlaceHolder
word wrap glyph
sighelp-documentation
currentParam
natural language
comment
identifier
keyword
whitespace
operator
literal
string
character
number
other
preprocessor keyword
symbol definition
symbol reference
(TRANSIENT)
url
line number
PageInspectorAutoSyncClassification
XML Doc Attribute
User Types

0 Comments:

Post a Comment

<< Home