Summary: No matter what settings you change, “Operators” in IronRuby are
always green (hex 008080).
I put a few hours into investigating this (
http://ironruby.codeplex.com/workitem/6117 ) and as far as I can tell,
it’s a bug in visual studio.
The language classifier used by IronRuby (DlrClassifier) is classifying
operators using PredefinedClassificationTypeNames.Operator - this is
apparently the correct thing to do, but when you do this, the text
always
comes out green and completely ignores the IDE fonts and colors
settings.
Tweaking the classifier to use anything other than
PredefinedClassificationTypeNames.Operator works, and allows you to
change
the color in the IDE settings, but for some reason that I cannot figure
out, using Operator always produces the same green.
Commenting out all logic other than the core classification logic (brace
matcher, etc) doesn’t affect this, and it is also reproducible using the
microsoft Ook language sample from here:
Given that I can’t seem to affect it, and it is reproducible in the ook
integration, this leads me to believe that it’s visual studio itself? I
tried to figure out what the C# language does (as you can change
“operator” colors in C#), but I couldn’t find any classification stuff
when running reflector over any of the standard visual studio libraries,
so I can’t figure out what it’s doing differently to make “operator”
work.
At any rate, I have a small patch which switches the classifier from
using
“operator” to “script operator”. With this patch you can change the
colors
for “script operator” in the IDE and have them affect operators in
IronRuby code
If anyone has more knowledge about VS integration and may be able to
help
with why the standard “operator” coloring is not working, I’d really
appreciate it.
If this is a bug in VS, do I need to file something somewhere? I’m not
sure where to go with it.
Thanks, Orion
###########################################################################
This e-mail is confidential and may contain information subject to legal
privilege. If you are not the intended recipient please advise us of
our
error by return e-mail then delete this e-mail and any attached files.
You may not copy, disclose or use the contents in any way.
The views expressed in this e-mail may not be those of Gallagher Group
Ltd or subsidiary companies thereof.
###########################################################################