My Visual Studio extension (VSIX) is derived from the Ook Language Example (found here). Basically, I have the following ClassificationFormatDefinition
with a function loadSavedColor
that loads the color the user has configured. Everything works fine.
[Name("some_unique_name")]
internal sealed class OokE : ClassificationFormatDefinition
{
public OokE()
{
DisplayName = "ook!"; //human readable version of the name
ForegroundColor = loadSavedColor();
}
}
Question: After the user has configured a new color, I like to invalidate the existing instance of class OokE
or change the existing instances and set ForegroundColor
. But whatever I do the syntax color is not updated.
I've tried:
- Get a reference to class
OokE
and updateForegroundColor
. Invalidate the corresponding
ClassificationTypeDefinition
:[Export(typeof(ClassificationTypeDefinition))] [Name("ook!")] internal static ClassificationTypeDefinition ookExclamation = null;