T. Scott


Other than writing out user types to the usertypes.dat file and waiting for the user to restart visual studio, is there a way to dynamically colorize user types If so, is there an example that I missed


Re: Visual Studio Extensibility Coloring User Types

Ed Dore

Hi Todd,

Colorization is actually provided by implementing a language service package. This package is usually written in conjunction with a specific project system as well, in order to know what all references, headers, etc are included in the project.

There are several ways to go about building a language service. You will need to download the Visual Studio SDK, and decide which technologies and language you which to utilize.

The IronPython language service is written in C# and makes use of some helper classes in the Managed Package Framework.

The Native MyC and Figs samples both implement a language service written with C++. The native MyC sample (in the archive directory) actually uses Flex and Bison, to provide the scanning/parsing support used by the native Babel langauge service.

There is also a new version of MyC written in C# that leverages a new Managed Babel service. Which makes use of a new managed scanner generator (MPLEX.exe), and parser generator (MPPG.exe).

I haven't messed with the UserTypes.dat file for quite a while, but my suspicion is that one or more of the existing language services probably build a keyword list from that file, to provide colorization support. But short of that particular features, the only other way to go about this would be to create your own language service.


Re: Visual Studio Extensibility Coloring User Types

T. Scott

Thanks Ed.

I kind of thought that was going to be the answer. It is a bit too much of a project for what we need. Right now we are just updating the usertype.dat file when we exit visual studio and then the items are properly colored the next time we start up. This is working pretty well and didn't take much effort.

Thanks for the help.