public Object exec() { debugGui.setVisible(true); dim.setBreak(); dim.setBreakOnEnter(true); dim.setBreakOnExceptions(true); return script.exec(cx, scope); }
@Override public void attachTo(ContextFactory factory) { super.attachTo(factory); if (factory instanceof SlingContextFactory) { this.slingContextFactory = (SlingContextFactory) factory; } }
protected void initDebugger() { dim = new Dim(); }
/** * Show the debugger */ public synchronized void show() { if (!isActive()) { activate(); } dim.setBreakOnExceptions(true); dim.setBreak(); dim.attachTo(factory); gui.pack(); gui.setSize(600, 460); gui.setVisible(true); }
Object source = e.getSource(); if (source == breakOnExceptions) { debugGui.dim.setBreakOnExceptions(breakOnExceptions.isSelected()); } else if (source == breakOnEnter) { debugGui.dim.setBreakOnEnter(breakOnEnter.isSelected()); } else if (source == breakOnReturn) { debugGui.dim.setBreakOnReturn(breakOnReturn.isSelected()); } else { debugGui.actionPerformed(e);
/** * Sets whether execution should break when a script exception is thrown. */ public void setBreakOnExceptions(boolean value) { dim.setBreakOnExceptions(value); debugGui.getMenubar().getBreakOnExceptions().setSelected(value); }
/** * Detaches from the current {@link ContextFactory}. */ public void detach() { dim.detach(); }
public RhinoDebugger(String source, ContextFactory factory) { dim = new Dim(); dim.setSourceProvider(new LscSourceProvider(source)); dim.attachTo(factory);// org.mozilla.javascript.tools.shell.Main.shellContextFactory); debugGui = new LscRhinoGui(dim, "Debugging LSC javascript", this); debugGui.setExitAction(this); debugGui.pack(); debugGui.setSize(600, 460); }
returnValue = Dim.GO; } else if (cmd.equals("Break")) { dim.setBreak(); } else if (cmd.equals("Exit")) { exit(); dim.setReturnValue(returnValue);
/** * Sets the {@link ScopeProvider} that provides a scope to be used * for script evaluation. */ public void setScopeProvider(ScopeProvider p) { dim.setScopeProvider(p); }
/** * Breaks execution of the script. */ public void doBreak() { dim.setBreak(); }
/** * Sets whether execution should break when a function is entered. */ public void setBreakOnEnter(boolean value) { dim.setBreakOnEnter(value); debugGui.getMenubar().getBreakOnEnter().setSelected(value); }
/** * Removes all breakpoints. */ public void clearAllBreakpoints() { dim.clearAllBreakpoints(); }
/** * Show the debugger */ public synchronized void show() { if (!isActive()) { activate(); } dim.setBreakOnExceptions(true); dim.setBreak(); dim.attachTo(factory); gui.pack(); gui.setSize(600, 460); gui.setVisible(true); }
Object source = e.getSource(); if (source == breakOnExceptions) { debugGui.dim.setBreakOnExceptions(breakOnExceptions.isSelected()); } else if (source == breakOnEnter) { debugGui.dim.setBreakOnEnter(breakOnEnter.isSelected()); } else if (source == breakOnReturn) { debugGui.dim.setBreakOnReturn(breakOnReturn.isSelected()); } else { debugGui.actionPerformed(e);
/** * Sets whether execution should break when a script exception is thrown. */ public void setBreakOnExceptions(boolean value) { dim.setBreakOnExceptions(value); debugGui.getMenubar().getBreakOnExceptions().setSelected(value); }
/** * Releases resources associated with this debugger. */ public void dispose() { detach(); }
returnValue = Dim.GO; } else if (cmd.equals("Break")) { dim.setBreak(); } else if (cmd.equals("Exit")) { exit(); dim.setReturnValue(returnValue);
/** * Sets the {@link ScopeProvider} that provides a scope to be used * for script evaluation. */ public void setScopeProvider(ScopeProvider p) { dim.setScopeProvider(p); }
/** * Breaks execution of the script. */ public void doBreak() { dim.setBreak(); }