if ( this.rhinoWindow != null )
{
return;
}
final Main sdb = new Main("Rhino JavaScript Debugger");
org.mozilla.javascript.tools.shell.ShellContextFactory contextFactory =
new org.mozilla.javascript.tools.shell.ShellContextFactory();
sdb.attachTo(contextFactory);
contextFactory.setLanguageVersion(Context.VERSION_1_8);
contextFactory.setOptimizationLevel(9);
sdb.pack();
sdb.setSize(640, 640);
sdb.setVisible(true);
sdb.setExitAction(new Runnable() {
public void run() {
sdb.clearAllBreakpoints();
sdb.dispose();
shutdown();
}
});
/*
Context.addContextListener(sdb);
sdb.setScopeProvider(new ScopeProvider() {
public Scriptable getScope() {
return org.mozilla.javascript.tools.shell.Main.getScope();
}
});
*/
sdb.addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e) {
shutdown();
}
});
this.rhinoWindow = sdb;