PreviousNextTracker indexSee it online !

(52/211) 3380 - Beanshell Error when executing action via macro

The TextTools plugin provides an action "toggle-range-comment", which works fine, if it was invoked directly via menu or action bar. But if this action was invoked via Beanshell macro file, a Beanshell error occurs, after the work is done well. The error does not occur, if "Utilities -> Beanshell -> Evaluate Beanshell expression" is used.

Beanshell macro:
a, jEdit.getAction("toggle-range-comment").invoke(view);
or b, TextToolsComments.toggleRangeComments(view);

Exception log:
java.lang.IllegalMonitorStateException
at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryRelease(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(Unknown Source)
at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock(Unknown Source)
at org.gjt.sp.jedit.buffer.JEditBuffer.writeUnlock(JEditBuffer.java:290)
\*at TextToolsComments.unlockBuffer(TextToolsComments.java:509)\*
at TextToolsComments.toggleRangeComments(TextToolsComments.java:289)
at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
...

Submitted rschwenn - 2010-01-23 13:50:53 Assigned
Priority 5 Labels
Status open Group None
Resolution None

Comments

2011-12-04 22:32:39
rschwenn

Still true.

jEdit 4.4.2 and jEdit 4.5pre1 daily
SUN JRE 1.6.0_24
Windows XP SP3

2012-12-05 15:47:45
bddali

Still exists, tested with jEdit 5.0, on Windows 7 with Oracle JRE 1.6.0_33.