language highlighting plugin question

Hi,

I am writting a language plugin. And I am basing it on the Javascript example that is online. Now I have highlighting working and I have created a ColorSettingsPage for my language. When I run the plugin and I go to the color and font settings I see my new language settings BUT...

1. the preview window does not get updated
2. the settings do not get saved.

What am i missing? Can someone point in the javascript example or elsewhere what I need to implement so that this will work? It used to work when I was simply mapping my new language on existing java highlighting settings. Although I had noticed that setting changes required a IDEA restart.

One of the key things I have changed is the TextAttributeKey defs in my implementaiton of SyntaxHighlighterBase.

Before:
static final TextAttributesKey FT_COMMENT = TextAttributesKey .createTextAttributesKey("FITNESSE.COMMENT", HighlighterColors.JAVA_DOC_COMMENT.getDefaultAttributes());

Now:
static final TextAttributesKey FT_COMMENT = TextAttributesKey.createTextAttributesKey("FITNESSE.COMMENT");

Is this wrong?

Florian

null

3 comments

Hi,

Here is the answer to this issue.

It seems that if you do not set a default TextAttribute when using one of the TextAttributesKey.createTextAttributesKey() methods your settings do not get saved or applied.

Florian

0

Hi,

I developed up to class extending SyntaxHighlighterBase class as specified in the tutorial. But did not build the PSI part. How we can set that to an editor?
Please tell me the steps you followed in developing syntax highlighting.


Thank You..!!

0

Please sign in to leave a comment.