I'm trying to figure out how I can extend my syntax highlighter to provide contextual highlighting similar to the Java editor, e.g., different highlights for class variables vs. member variables vs. constants. The standard syntax highlighter is just passed a token type and not the actual token. I'm assuming this is some kind of second pass highlighting, but I can't seem to figure out how it's done. Any tips?
Thanks in advance!
UPDATE: I may have just figured this out. It looks like it may occur through ColoredItemPresentation.getTextAttributesKey(). Going to try that out this evening and see whether it does it or not.
UPDATE 2: Nope, that just seems to affect things like the structure view, not the editor.
UPDATE 3: Looks like I need an Annotator for this (http://www.jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.html). I'll resolve this as answered once I confirm.
UPDATE 4: Yup, that does it.