I have introduced a开发者_StackOverflow社区 Rhino-based scripting language. In this language, by its nature of course, it is legal to write something like:
var y = new org.mypackage.JavaClass();
print(y.javaMethodReturnsString());
Which means I'm mixing Java entities and Javascript entites. I wish to make a netbeans editor plugin for my new language. This editor must feature content assist.
Now, the javascript entites appear in the javascript editor content assist by default. I guess I can extend the netbeans javascript editor, but how? Which class is it? Then, how do I extend the content assist scope with the java entities?
Or maybe I should make my own editor and "import" java and javascript content assist behavior? But again, how?
Thank you
EDIT: to have the java entities in the classpath, I followed this blog post : Java Classes in Code Completion by the way, this works only if edited document is in a source folder. Still remains open the question about extending javascript editor. Anyone?
Even if this question was worth the Tumbleweed achievement, I found a solution myself. I've written a netbeans module to handle content assist on Rhino scripts. It's in early development and it's my first netbeans plugin but should be better than nothing.
The plugin can be turned on/off for javascript files and can be class-extended to suit any rhino-interpreted languages, which is the next thing I'm into.
Javascript Rhino context plugin
精彩评论