Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VS2012 FontAndColors text editor category for language service colors

$
0
0

Hi All,

I've been fighting for several hours trying to force font and color settings to update in VS2012 on a newly installed package with a language service. This does not appear to happen automatically with either a package install or a VSIX install. The suggested code I've found recommends clearing and/or refreshing the cache for the text editor category (using IVsFontAndColorManager.ClearCache and/or RefreshCache). If colors have not been verified for an installed revision of my package (as recorded in a user registry setting), I search IVsFontAndColorStorage for the required colors, then call ClearCache as needed.

This works fine against the text editor category in VS2010 (category guid {A27B4E24-A735-4d1d-B8E7-9716E1E3D8E0}). However, in VS2012 the code had no effect in updating the options dialog or actually producing colors for my language service.

After digging through the registry I found a text editor subcategory called either 'Text Editor Language Service Items' or just 'Language Service Items'. Using the associated category identifier (category {E0187991-B458-4F7E-8CA9-42C9A573B56C}) actually forces the language service to be asked for its colorable items.

So, while I can use the text editor category to get cached items, I cannot use the same text editor category to clear the cache. I need to explicitly use the subcategory.

I would like some verification or an official name for this magic category id. The text editor category id is in Microsoft.Visualtudio.Shell.Interop.FontsAndColorsCategory.TextEditor and can also be found in the SDK .idl and .h files, but I'm not finding this other id anywhere.

    • Does this magic new category id have a name?
    • Can it be found in the SDK?
    • Can you verify the behavior I'm seeing?

    Thanks,

    -Matt

    PS This whole area has gotten progressively less stable moving from VS2005/08/10/12. In 2010 the language service would show colors that were not represented in the cache or options dialog. In 2012, you just get default text, so forcing the cache to reset is suddenly pri 1 (no coloring at all) instead of pri 3 (can't view and customize colors).


    Viewing all articles
    Browse latest Browse all 4410

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>