#2986 pre12: bsh: Command not found: exec( java.lang.String )

closed-fixed
macros (56)
5
2007-11-21
2007-11-19
daniel hahler
No

I have a macro, where I'm using "exec( foo );", but with jEdit SVN, it results in a beanshell error now.

My guess is that it's related to the following change:
"""- The bsh package was refactored to org.gjt.sp.jedit.bsh, all plugins that uses classes from this package will have to be repaired. This was necessary to fix bug (893349) (Matthieu Casanova)"""

The error:

BeanShell error
Sourced file: [...]\.jedit\macros\create_tags_for_buffer.bsh : Command not found: exec( java.lang.String ) : at Line: 13 : in file: [...]\.jedit\macros\create_tags_for_buffer.bsh : exec ( foo )

at org.gjt.sp.jedit.bsh.Name.invokeLocalMethod(Name.java:949)
at org.gjt.sp.jedit.bsh.Name.invokeMethod(Name.java:801)
at org.gjt.sp.jedit.bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:46)
at org.gjt.sp.jedit.bsh.BSHIfStatement.eval(BSHIfStatement.java:48)
at org.gjt.sp.jedit.bsh.Interpreter.eval(Interpreter.java:644)
at org.gjt.sp.jedit.BeanShell._runScript(BeanShell.java:341)
at org.gjt.sp.jedit.BeanShell._runScript(BeanShell.java:286)
at org.gjt.sp.jedit.BeanShell.runScript(BeanShell.java:212)
at org.gjt.sp.jedit.Macros$BeanShellHandler.runMacro(Macros.java:1020)
at org.gjt.sp.jedit.Macros$Macro.invoke(Macros.java:441)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:418)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:384)
at actionhooks.EBMessageHandler.fireActions(EBMessageHandler.java:150)
at actionhooks.ActionHooksPlugin.handleMessage(ActionHooksPlugin.java:78)
at org.gjt.sp.jedit.EditBus.send(EditBus.java:148)
at org.gjt.sp.jedit.Buffer.finishSaving(Buffer.java:1989)
at org.gjt.sp.jedit.Buffer.access$800(Buffer.java:83)
at org.gjt.sp.jedit.Buffer$2.run(Buffer.java:589)
at org.gjt.sp.util.WorkThreadPool.doAWTRequest(WorkThreadPool.java:398)
at org.gjt.sp.util.WorkThreadPool.doAWTRequests(WorkThreadPool.java:383)
at org.gjt.sp.util.WorkThreadPool.access$200(WorkThreadPool.java:37)
at org.gjt.sp.util.WorkThreadPool$RunRequestsInAWTThread.run(WorkThreadPool.java:483)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Discussion

  • Alan Ezust
    Alan Ezust
    2007-11-20

    • assigned_to: jgellene --> kpouer
     
  • Logged In: YES
    user_id=285591
    Originator: NO

    I'm sorry I cannot fix that macro since I don't know what it is and from where it comes. Daniel ?

     
    • status: open --> pending
     
  • Logged In: YES
    user_id=265596
    Originator: NO

    It's from the beanshell 'commands' folder (org/gjt/sp/jedit/bsh/commands). To replicate, try using 'setAccessibility(true)' (referenced in 'startup.bsh') or running one of the macros that use it, for example: Editing > Emacs Next Line.

     
  • svn diff for jEdit/trunk r11113

     
    Attachments
  • Logged In: YES
    user_id=1483238
    Originator: NO

    I found build.xml still referring the old "bsh" directory including
    "commands/*.bsh" files. The attached patch will fix them.

    File Added: build.xml.patch

     
  • Logged In: YES
    user_id=1483238
    Originator: NO

    Fixed in r11116.

     
    • assigned_to: kpouer --> k_satoda
    • status: pending --> closed-fixed