# Wolfram workbench syntax highlighting for local variables inside compile

Lately I've been working quite a lot with Compile. I also started using Wolfram Workbench.

So a natural question arises: Is it possible to have syntax highlighting for local variable variables inside compile as well? Here is a screenshot demonstrating the problem. Notice the blue x's in the lower right hand side of the image? These should be green.

I didn't manage to find anything under the preferences. I'm using WB 2.0

-
Someone from WRI has to answer/fix this. In the meanwhile I would just use a simple trick and put a Block around, e.g.: cf = Block[ {x}, Compile[{{x, _Real}}, Sin[x] + x^2 - 1/(1 + x)] ] –  Rolf Mertig Jan 21 '13 at 10:44
@RolfMertig That's actually not a bad idea. Does this have any performance or any other side effects? –  Ajasja Jan 21 '13 at 12:34
no, it just evaluates to its body, so all is good. –  Rolf Mertig Jan 21 '13 at 12:38
@RolfMertig Could you put that as an answer? I think this is what I'll end up doing. –  Ajasja Jan 21 '13 at 12:45

As far as I know, you cannot change this. I cannot exactly say how it works in Eclipse, but usually the highlighting process consists of several steps. Basic highlighting can be provided after the lexical analysis. For a context sensitive highlighting like the one for local variables inside Module, Block, Function or in your case Compile, you need to parse the input.
If you are using the Workbench plugin for Eclipse, you can at least get an idea where and how this is implemented. In the plugins directory (in OSX) inside your Eclipse installation path you should find directories for the Wolfram plugin. If you dig a bit in the lib directory there, you'll find that an antlr parser was created to parse Mathematica code. With the help of this parser highlighting and error/warning features are implemented and provided for Eclipse inside the MEET.jar.
To change the behaviour for Compile, you would have to change it inside the MEET code which you don't have access to since the jar files contain (almost) only byte-code.