|
From: realmerx <rea...@gm...> - 2008-05-29 07:18:08
|
Made the script little more robust:
plugin =
org.gjt.sp.jedit.jEdit.getPlugin("com.patelsoft.superscript.SuperScriptPlugin");
cl = plugin.getPluginJAR().getClassLoader();
plugin.loadBSFManager(view);
bsfm = plugin.bsfmanager;
bsfm.setClassLoader(cl);
org.mozilla.javascript.Context.getCurrentContext();
cx = org.mozilla.javascript.Context.enter();
cx.setLanguageVersion(170);
Take care,
Villu
On Mon, May 12, 2008 at 12:45 PM, realmerx <rea...@gm...> wrote:
> Hello,
>
> I figured out how to to get SuperScript plugin to work with bsf 2.4 and
> Rhino 1.7R1 without modifying the superscript plugin code (using some
> beanshell trickery).
>
> - First of all remove JakartaCommons plugin and download newer apache
> commons-logging (old one fails with bsf 2.4) and put it in ~/.jedit/jars. If
> you find jedit complaining about some other apache common jars download them
> as well.
>
> - Start up jedit and execute following through beanshell (using Console
> plugin or utilities -> Beanshell -> evaluate selection).
>
> plugin =
> org.gjt.sp.jedit.jEdit.getPlugin("com.patelsoft.superscript.SuperScriptPlugin");
> plugin.bsfmanager.setClassLoader(plugin.getPluginJAR().getClassLoader());
>
> org.mozilla.javascript.Context.getCurrentContext().enter().setLanguageVersion(170);
>
> Ignore the error you get and open up SupersSript plugin. It should now work
> just fine.
> If you open up superscript plugin and fool around there before executing
> beanshell magic then you probably won't get error.
>
> Description:
>
> Fist line gets loaded superscript plugin class.
> Second one works around the problem of bsfmanager not using jEdits's
> JARClassLoader.
> Third one is only necessary if you want to use javascript 1.7 stuff (list
> comprehensions, iterators, generators).
>
> All the best,
> Villu
>
>
>
>
>
>
>
|