예제 #1
0
  /** Description of the Method */
  public void init() {

    global = new NameSpace(new BshClassManager(), "Embedded BeanShell interpreter");
    // global.importPackage("org.gjt.sp.util");
    global.importPackage("org.twdata.TW1606U.gui");
    global.importPackage("org.twdata.TW1606U.signal");
    global.importPackage("org.twdata.TW1606U.action");
    global.importPackage("org.twdata.TW1606U.tw");
    global.importPackage("org.twdata.TW1606U.tw.data");
    global.importPackage("org.twdata.TW1606U.data");
    global.importPackage("org.twdata.TW1606U.tw.model");
    global.importPackage("org.twdata.TW1606U.tw.signal");
    global.importPackage("org.werx.framework.bus");
    interpForMethods = createInterpreter(global);
  } // }}}
예제 #2
0
 /**
  * Import standard packages. Currently:
  *
  * <pre>
  * importClass("bsh.EvalError");
  * importClass("bsh.Interpreter");
  * importPackage("javax.swing.event");
  * importPackage("javax.swing");
  * importPackage("java.awt.event");
  * importPackage("java.awt");
  * importPackage("java.net");
  * importPackage("java.util");
  * importPackage("java.io");
  * importPackage("java.lang");
  * importCommands("/bsh/commands");
  * </pre>
  */
 public void loadDefaultImports() {
   /**
    * Note: the resolver looks through these in reverse order, per precedence rules... so for max
    * efficiency put the most common ones later.
    */
   importClass("bsh.EvalError");
   importClass("bsh.Interpreter");
   importPackage("javax.swing.event");
   importPackage("javax.swing");
   importPackage("java.awt.event");
   importPackage("java.awt");
   importPackage("java.net");
   importPackage("java.util");
   importPackage("java.io");
   importPackage("java.lang");
   importCommands("/bsh/commands");
 }