IntelliLang plugin problems

First, excellent plugin. Now over to some issues Im having with it.

1. Highlighting level must be set to either "Syntax" or "Inspections" in the editor. If I turn it off the language injections stop working.

2. I need two versions of the same tag. It only seem to work with one version at the time.
E.g. I need the "Script" tag set to JavaScript language. I also need the "Script" tag with a special namespace to also be set to inject JavaScript language.

Best Regards
Johan Lund

6 comments
Comment actions Permalink

Hello Johan,

the first issue is unfortunately nothing the plugin can do about because the actual injection is controlled by IDEA. It probably thinks that the injection is some kind of "highlighting" (which isn't wrong actually) that is only applied on those highlighting levels.

Can you elaborate on the "two versions" of a tag, please? As I understand it right now, you just need to configure two tag injections for the "Script" tag: one without specifying any namespace and another one (you can use the "Copy" function) where you specify your special namespace. I tried this and it worked for me (though you may need to modify the content of the tags to force the injection to be applied).

HTH,
Sascha

0
Comment actions Permalink

Thanks for the quick response.

About issue nr2; you understood me correctly.
I too got it working now. :)
It seems that it works when you copy a tag in IntelliLang but not when you make a new one with the same name and add a namespace to it. I also had to restart Intellij to make it work. Anyway I got it working now so thats the important thing.

Another issue has surfaced however.

3. Injection flickers on and off while typing.
I'm using a pretty large xml schema to get code completion in an xml file. In the cdata section of a Script tag I want javascript so I use IntelliLang for that. For each letter I type it switches all highlighting to black text and then back to javascript highlighting.
Any ideas here?

0
Comment actions Permalink

Well, I did not notice any difference between copying an entry an creating an entirely new one. I also never had to restart IDEA yet to get a new setting recognized. Sometimes it's applied right after closing the settings window, but if it isn't, making a small edit in the affected document(s) and/or attributes/tags is usually enough. If all else fails, ctrl-a, ctrl-x, ctrl-v takes finally care of it. The reason is the caching IDEA does for the injected fragments.

About the flickering, this sounds like a general issue in IDEA, but could also be a performance problem in the plugin. I know that while editing such a fragment, all newly typed characters appear in black and are syntax-highlighted after the normal reparse-delay. However I never saw the highlighting for the whole injected fragment turning black while typing.

Could you try to create a CPU snapshot while this happens and send it to me via email? Or even better, send me a file that can be used to reproduce the effect? I cannot promise anything, but I'll at least have a look at it.

Sascha

0
Comment actions Permalink

Here comes a file. It contains all you need to reproduce the problem. I put a textfile with instructions in it.

Thanks alot!



Attachment(s):
intellilangFlicker.zip
0
Comment actions Permalink

Hello Johan,

sorry for the delay. I checked your example file and now I'm quite sure that the flickering is something the IDEA core is responsible for because it seems to depend on the length and/or the complexity of the JavaScript-area. I'll keep an eye on this though.

Sascha

0
Comment actions Permalink

Thanks Sascha.

Will you log it as a bug? I'll vote... :)

Btw. Was the response on the code completion slow for you?
I've got some kind of mysterious slowdown. That same schema is sometimes very fast and sometimes very slow.
Im not sure its related because I installed the plugin in a fresh intellij on a different machine and it didnt flicker. But code completion was slow.
I will continue testing to see what's causing the slowdown.

0

Please sign in to leave a comment.