On Nov 18, 5:13 pm, [EMAIL PROTECTED] wrote: > I am writing an eclipse plugin to contribute to eclipse dynamic > extensions using javascript. > > User inputs the plugin information using xml tags. For plugin action > handlers I am providing a <Script> tag where in user can write > javascript code, to be compiled by rhino. My assumption is that I can > provide the rhino generated class file as an attribute > (class=somepackage.class) to dynamic extension attributes that will be > linked to the plugin action for execution. I am not sure how can I get > access to the compiled class from rhino. Please suggest.
I'm not sure I understand exactly what you're trying to do, but you can compile scripts to .class files using jsc (see https://developer.mozilla.org/en/Rhino_JavaScript_Compiler). But likely you'll just want to select the script text and call Context.compileString or Context.compileReader. Depending on the optimization mode, Rhino will compile to bytecode in memory and load the class for you. --N _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
