PreviousNextTracker indexSee it online !

(85/231) 2937930 - 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:
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(
*at TextToolsComments.unlockBuffer(*
at TextToolsComments.toggleRangeComments(
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:53z Assigned nobody
Priority 5 Category None
Status Open Group None
Resolution None Visibility No


2011-12-04 - 22:32:39z
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:45z
Still exists, tested with jEdit 5.0, on Windows 7 with Oracle JRE 1.6.0_33.