/** * Exit action. */ @Override public void run() { debugGui.dispose(); }
SlingRhinoDebugger(String windowTitle) { gui = new SwingGui(this, windowTitle); gui.pack(); gui.setVisible(true); gui.setExitAction(new Runnable() { public void run() { if (slingContextFactory != null) { slingContextFactory.debuggerStopped(); } } }); }
/** * Returns whether the debugger GUI frame is visible. */ public boolean isVisible() { return debugGui.isVisible(); }
/** * 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); }
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); }
setJMenuBar(menubar); toolBar = new JToolBar(); JButton button; getContentPane().add(toolBar, BorderLayout.NORTH); getContentPane().add(contentPane, BorderLayout.CENTER); desk = new JDesktopPane(); desk.setPreferredSize(new Dimension(600, 300)); context); split1.setOneTouchExpandable(true); SwingGui.setResizeWeight(split1, 0.66); contentPane.add(split1, BorderLayout.CENTER); statusBar = new JLabel(); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) {
public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("Exit")) { debugger.hide(); } else { super.actionPerformed(e); } } }
/** * Activate the Debugger */ public synchronized void activate() { factory = ContextFactory.getGlobal(); Global global = new Global(); global.init(factory); global.setIn(System.in); global.setOut(System.out); global.setErr(System.err); initDebugger(); ScopeProvider sp = new AlfrescoScopeProvider((Scriptable)global); dim.setScopeProvider(sp); gui = new AlfrescoGui(dim, getTitle(), this); gui.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); gui.setExitAction(this); }
/** * Sets the debugger GUI frame dimensions. */ public void setSize(int w, int h) { debugGui.setSize(w, h); }
/** * Sets the visibility of the debugger GUI frame. */ public void setVisible(boolean flag) { debugGui.setVisible(flag); }
/** * Packs the debugger GUI frame. */ public void pack() { debugGui.pack(); }
/** * Assign a Runnable object that will be invoked when the user * selects "Exit..." or closes the Debugger main window. */ public void setExitAction(Runnable r) { debugGui.setExitAction(r); }
/** * Creates a new Main. */ public Main(String title) { dim = new Dim(); debugGui = new SwingGui(dim, title); }
debugGui.addTopLevel("Variables", frame); debugGui.addTopLevel("Evaluate", frame); frame.setResizable(true); rightDocked = false;
/** * 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); }
setJMenuBar(menubar); toolBar = new JToolBar(); JButton button; getContentPane().add(toolBar, BorderLayout.NORTH); getContentPane().add(contentPane, BorderLayout.CENTER); desk = new JDesktopPane(); desk.setPreferredSize(new Dimension(600, 300)); context); split1.setOneTouchExpandable(true); SwingGui.setResizeWeight(split1, 0.66); contentPane.add(split1, BorderLayout.CENTER); statusBar = new JLabel(); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) {
public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("Exit")) { debugger.run(); } else { super.actionPerformed(e); } } }
/** * Activate the Debugger */ public synchronized void activate() { factory = ContextFactory.getGlobal(); Global global = new Global(); global.init(factory); global.setIn(System.in); global.setOut(System.out); global.setErr(System.err); initDebugger(); ScopeProvider sp = new AlfrescoScopeProvider((Scriptable)global); dim.setScopeProvider(sp); gui = new AlfrescoGui(dim, getTitle(), this); gui.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); gui.setExitAction(this); }
/** * Sets the debugger GUI frame dimensions. */ public void setSize(int w, int h) { debugGui.setSize(w, h); }
/** * Sets the visibility of the debugger GUI frame. */ public void setVisible(boolean flag) { debugGui.setVisible(flag); }