RSyntaxTextArea+SYNTAX_STYLE_JAVASCRIPT

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: RSyntaxTextArea+SYNTAX_STYLE_JAVASCRIPT

Re: RSyntaxTextArea+SYNTAX_STYLE_JAVASCRIPT

Post by robert » Fri Sep 07, 2012 2:29 pm

In order for it to be added to Beanshell, etc., those languages would also need LanguageSupport implemented for them, and that isn't too high on the priority list at the moment, unfortunately. Beanshell might be easier than others, since my understanding is it's very close to Java (moreso than Groovy, for example), and thus could likely use the WIP Java parser.

Re: RSyntaxTextArea+SYNTAX_STYLE_JAVASCRIPT

Post by Chad » Thu Sep 06, 2012 11:37 pm

I also think that's a great idea and I'd like to see that feature as well. Is there any way that this could be generic enough to work with any language that has LanguageSupport available? I use ScriptEngineManager as well with Beanshell, JACL (TCL), Jython, JS, etc.

Re: RSyntaxTextArea+SYNTAX_STYLE_JAVASCRIPT

Post by robert » Thu Sep 06, 2012 1:25 pm

This is a good idea. Please add a Feature Request on the project's SourceForge page so this can be tracked.

RSyntaxTextArea+SYNTAX_STYLE_JAVASCRIPT

Post by pavel.kotala » Thu Sep 06, 2012 7:33 am

Hallo everybode,
I am not sure if this is right forum, but I have not found any other.

We use Java scripting and I just added JavaScript editor into our new application using RSyntaxTextArea and LanguageSupportFactory.

It works fine when using autocomplete for global classes like Math, Number, etc.

I would like it would work also for classes and variables that are bound using engine put() method when evaluating javascript using java scripting, like:

java code:

engine = new ScriptEngineManager().getEngineByName("JavaScript");
engine.put("obj", new MyClass());


So when i type obj. in editor, it would suggest methods of MyClass.

As I guess there is no support at this time. Is there any way to add them to JavaScriptAutoCompletion? I could list available classes and methods, but I do not know, how to bind them to JavaScriptAutoCompletion.

Thank you
Pavel

Top

cron