This section outlines a few enhancements to jEdit's integrated BeanShell interpreter. Also see the section called “Common API”.
A new preset BeanShell variable, wm is set to the view.getDockableWindowManager().
BeanShell has been updated from version 1.2b7 to 1.3a1. The changes in stock BeanShell 1.3a1 from 1.2b7 include improved error reporting, improved performance, and various fixes.
A number of jEdit-specific changes are also present in this BeanShell version; they will eventually be merged back into the main BeanShell source tree.
Previously plugins that wanted to provide BeanShell scripting commands had to source a BeanShell script on startup. This was slow. Now, BeanShell supports a “command path”. When an unresolved method name is entered, the command path is consulted for the method definition. Entries are added to the command path using the following method of the NameSpace class:
void addCommandPath(
String path, Class clas)
;
For example, if your plugin provides commands in the commands directory of the JAR file, you could call something like this:
BeanShell.getNameSpace().addCommandPath("/commands/", MyPlugin.class); |