Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1042095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:27:11+00:00 2026-05-16T15:27:11+00:00

Does anyone know where I can get a list of BaseDefinitions for the ClassificationTypeDefitions

  • 0

Does anyone know where I can get a list of BaseDefinitions for the ClassificationTypeDefitions in Visual Studio 2010?

I’m trying to define a base definition of “UserTypes” but it doesn’t seem to work. For those that don’t quite know what I’m talking about and need code to make it easier…

[Export(typeof(ClassificationTypeDefinition))]
[Name("keyword")]
[BaseDefinition("keyword")]
internal static ClassificationTypeDefinition KeywordDefinition = null;

That currently uses the keyword definition of c# for highlighting or what not. But I can’t seem to get the one for User types to work (Class/enum/structure names and other similar objects). I’ve tried using the vs settings file and using the definitions defined in there but the definition “User Types” didn’t work.

Thanks, in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T15:27:12+00:00Added an answer on May 16, 2026 at 3:27 pm

    The PredefinedClassificationTypeNames type has a list of common/shared ones, but “User Types” is an example of one that is supplied by languages.

    The short answer is that the [BaseDefinition] should match up with the display name in the Fonts and Colors dialog for language services that haven’t moved off the VS2008 interfaces (like C#). If it isn’t working when that is the case, you may be able to convince it to work by adding a second classification type definition with that name (“User Types”).

    The long answer is this:

    In order to supply classification type information for these languages, the editor dynamically generates them the first time you open a file that is associated with a language service. The synchronization process is essentially:

    1. Walk through the colorable items provided by the language service (IVsColorableItemsProvider)
    2. If any of the colorable items don’t have associated classification types, generate a new classification type for it (using IClassificationTypeRegistryService.CreateClassificationType).
    3. Walk through the information from Fonts and Colors to create/modify formatting information for these classification types

    So the problem would be that the type doesn’t exist at the time that your classification type definition is picked up by the editor. However, adding a classification type definition for the would-be-dynamically generated type should keep both parts happy: your type’s base definition will be set up correctly, and the synchronization process will happily skip step #2, since there is already an item by that name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how I can get a list of events owned (created) by
Does anyone know where I can get a list of the converters used by
does anyone know where i can get the official list of all AT COMMANDS
Does anyone know where I can go to get a list of the new
Does anyone know how I can get rid of the following assembler warning? Code
Does anyone know how I can get a format string to use bankers rounding
Does anyone know how I can get the SelectedItem (not the Header) from a
Does anyone know if there is a way I can get the XCode method/class
Does anyone know how I can, in platform-independent C++ code prevent an object from
Does anyone know how I can check to see if a directory is writeable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.