Port Java language support to Beanshell

Answered

Hi, I work with Beanshell quite often.  Although I've managed to get basic syntax highlighting working by associating Beanshell files with Java, there are still a lot of things that I would like to get to work better, like auto-complete, doc lookups, etc.  Another issue is that all Beanshell code in the editor is underlined in red and the help-popup says "Class or interface expected". I'm not a Java programmer but I think this is caused by Beanshell not needing explicit declaration of classes or libraries as they're included automatically at script runtime.  

Either way, my intention was to take the build-inJava language support and port it to handle Beanshell by removing some of the sytax checking or whatever else.  Honestly, I would be happy with just getting rid of the persistent red underlining regarding the class declarations by forcing the editor to ignore that check.  I thought this would be faster than starting from scratch.  Is this something that's doable without more effort than it's worth?  

Any input appreciated.  

Thanks.

0
2 comments

The existing Java support is not really built for being re-used and "tweaked". You can suppress false warnings though via com.intellij.codeInsight.daemon.ProblemHighlightFilter

0

Ok, thank you Yann for clarifying that tweaking the built-in support is not really feasible.  I guess I figured that would be the case.  But I will try your suggestion to get rid of the red underlining.  

Although it looks daunting, Beanshell support is important enough to me to try and work on a plugin.  I've been using the Powershell plugin as a guide on how to proceed.

 

Thanks,

Gregg

0

Please sign in to leave a comment.