Use Existing Classification Types RRS feed

  • Question

  • Hi,

    I am looking to use Visual Studio existing classification types that already have associated "Fonts and Colors" options. For example, the "XML Name" item. This way, when the user changes the "XML Name" color, or the whole theme, my classification coloring will be updated also.

    What name should I pass into "IClassificationTypeRegistryService.GetClassificationType" to get the "XML Name" classification type?

    Tuesday, May 5, 2015 1:28 AM


  • Hi AlanNg86,

    According to this documentation:

    Editor Extension Points

    The IStandardClassificationService   provides access to standard classifications. Built-in classification types   include these:

    • "text"
    • "natural   language" (derives from "text")
    • "formal   language" (derives from "text")
    • "string"   (derives from "literal")
    • "character"   (derives from "literal")
    • "numerical"   (derives from "literal")

    A set of different error types   inherit from ErrorTypeDefinition.   They include the following error types:

    • "syntax   error"
    • "compiler   error"
    • "other   error"
    • "warning"

    To discover the list of   available Classification types, import the IClassificationTypeRegistryService,   which maintains the collection of classification types for the editor. The   following code imports this service as a property.

    Seems that we can't use this method to get the "XML Name" classification type, the built-in classification types only include 6 of them. But you could create your own custom classification type instead.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Caillen Wednesday, May 13, 2015 9:21 AM
    Wednesday, May 6, 2015 10:40 AM