http://www.jpicedt.org

jpicedt.ui.util
Class BeanShell

java.lang.Object
  extended by jpicedt.ui.util.BeanShell
All Implemented Interfaces:
Runnable

public class BeanShell
extends Object
implements Runnable

Wrapper for the BSH interpreter console + some useful static methods for running scripts from inside JPicEdt.


Constructor Summary
BeanShell(MDIManager mdimgr)
          Open a new BSH console, and start the BSH interpreter interactively in it.
 
Method Summary
static void _main(String[] args)
           
static JMenu createMenu()
          Return a JMenu containing a hierarchy of JMenu's and JMenuItem's built from the BSH scripts contained, first in the installation script directory, then in the user script directory.
static void main(String[] args)
           
 void run()
          Run the BSH interpreter in interactive mode.
static void runScript(String scriptPath, String scriptName)
          Run a BSH script with the given path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanShell

public BeanShell(MDIManager mdimgr)
Open a new BSH console, and start the BSH interpreter interactively in it.

Method Detail

_main

public static void _main(String[] args)

run

public void run()
Run the BSH interpreter in interactive mode.

Specified by:
run in interface Runnable

runScript

public static void runScript(String scriptPath,
                             String scriptName)
Run a BSH script with the given path.

Parameters:
scriptPath - absolute script path
scriptName - script name, for instance "Repeat copy" ; used mainly for undo/redo menus.

main

public static void main(String[] args)

createMenu

public static JMenu createMenu()
Return a JMenu containing a hierarchy of JMenu's and JMenuItem's built from the BSH scripts contained, first in the installation script directory, then in the user script directory.

Returns:
an empty JMenu if no BSH scripts were found in either directory.

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org