FileWindow w = new FileWindow(this, sourceInfo); fileWindows.put(url, w); if (line != -1) { if (currentWindow != null) { currentWindow.setPosition(-1); w.setPosition(w.textArea.getLineStartOffset(line-1)); } catch (BadLocationException exc) { try { w.setPosition(w.textArea.getLineStartOffset(0)); } catch (BadLocationException ee) { w.setPosition(-1); w.setVisible(true); w.setMaximum(true); w.setSelected(true); w.moveToFront(); } catch (Exception exc) {
/** * Toggles the breakpoint on the given line. */ public void toggleBreakPoint(int line) { if (!isBreakPoint(line)) { setBreakPoint(line); } else { clearBreakPoint(line); } }
/** * Updates the tool tip contents. */ private void updateToolTip() { // Try to set tool tip on frame. On Mac OS X 10.5, // the number of components is different, so try to be safe. int n = getComponentCount() - 1; if (n > 1) { n = 1; } else if (n < 0) { return; } Component c = getComponent(n); // this will work at least for Metal L&F if (c != null && c instanceof JComponent) { ((JComponent)c).setToolTipText(getUrl()); } }
int start = w.getPosition(lineNumber-1); int end = w.getPosition(lineNumber)-1; w.textArea.select(start); w.textArea.setCaretPosition(start); if (w.isIcon()) { w.setIcon(false); w.setVisible(true); w.moveToFront(); w.setSelected(true); requestFocus(); w.requestFocus(); w.textArea.requestFocus(); } catch (Exception exc) {
try { if (line == -1) { w.setPosition(-1); if (currentWindow == w) { currentWindow = null; int loc = ta.getLineStartOffset(line-1); if (currentWindow != null && currentWindow != w) { currentWindow.setPosition(-1); w.setPosition(loc); currentWindow = w; if (w.isIcon()) { desk.getDesktopManager().deiconifyFrame(w); w.show(); w.toFront(); // required for correct frame layering (JDK 1.4.1) w.setSelected(true); } catch (Exception exc) {
FileWindow w = (FileWindow)obj; try { if (w.isIcon()) { w.setIcon(false); w.setVisible(true); w.moveToFront(); w.setSelected(true); } catch (Exception exc) {
/** * Performs an action. */ public void actionPerformed(ActionEvent e) { int pos = viewToModel(new Point(popup.x, popup.y)); popup.setVisible(false); String cmd = e.getActionCommand(); int line = -1; try { line = getLineOfOffset(pos); } catch (Exception exc) { } if (cmd.equals("Set Breakpoint")) { w.setBreakPoint(line + 1); } else if (cmd.equals("Clear Breakpoint")) { w.clearBreakPoint(line + 1); } else if (cmd.equals("Run")) { w.load(); } }
/** * Loads the file. */ void load() { String url = getUrl(); if (url != null) { RunProxy proxy = new RunProxy(debugGui, RunProxy.LOAD_FILE); proxy.fileName = url; proxy.text = sourceInfo.source(); new Thread(proxy).start(); } }
} catch (BadLocationException ignored) { boolean isBreakPoint = fileWindow.isBreakPoint(i + 1); text = Integer.toString(i + 1) + " "; int y = i * h;
int start = w.getPosition(lineNumber-1); int end = w.getPosition(lineNumber)-1; w.textArea.select(start); w.textArea.setCaretPosition(start); if (w.isIcon()) { w.setIcon(false); w.setVisible(true); w.moveToFront(); w.setSelected(true); requestFocus(); w.requestFocus(); w.textArea.requestFocus(); } catch (Exception exc) {
try { if (line == -1) { w.setPosition(-1); if (currentWindow == w) { currentWindow = null; int loc = ta.getLineStartOffset(line-1); if (currentWindow != null && currentWindow != w) { currentWindow.setPosition(-1); w.setPosition(loc); currentWindow = w; if (w.isIcon()) { desk.getDesktopManager().deiconifyFrame(w); w.show(); w.toFront(); // required for correct frame layering (JDK 1.4.1) w.setSelected(true); } catch (Exception exc) {
FileWindow w = (FileWindow)obj; try { if (w.isIcon()) { w.setIcon(false); w.setVisible(true); w.moveToFront(); w.setSelected(true); } catch (Exception exc) {
/** * Performs an action. */ public void actionPerformed(ActionEvent e) { int pos = viewToModel(new Point(popup.x, popup.y)); popup.setVisible(false); String cmd = e.getActionCommand(); int line = -1; try { line = getLineOfOffset(pos); } catch (Exception exc) { } if (cmd.equals("Set Breakpoint")) { w.setBreakPoint(line + 1); } else if (cmd.equals("Clear Breakpoint")) { w.clearBreakPoint(line + 1); } else if (cmd.equals("Run")) { w.load(); } }
/** * Loads the file. */ void load() { String url = getUrl(); if (url != null) { RunProxy proxy = new RunProxy(debugGui, RunProxy.LOAD_FILE); proxy.fileName = url; proxy.text = sourceInfo.source(); new Thread(proxy).start(); } }
} catch (BadLocationException ignored) { boolean isBreakPoint = fileWindow.isBreakPoint(i + 1); text = Integer.toString(i + 1) + " "; int y = i * h;
int start = w.getPosition(lineNumber-1); int end = w.getPosition(lineNumber)-1; w.textArea.select(start); w.textArea.setCaretPosition(start); if (w.isIcon()) { w.setIcon(false); w.setVisible(true); w.moveToFront(); w.setSelected(true); requestFocus(); w.requestFocus(); w.textArea.requestFocus(); } catch (Exception exc) {
FileWindow w = new FileWindow(this, sourceInfo); fileWindows.put(url, w); if (line != -1) { if (currentWindow != null) { currentWindow.setPosition(-1); w.setPosition(w.textArea.getLineStartOffset(line-1)); } catch (BadLocationException exc) { try { w.setPosition(w.textArea.getLineStartOffset(0)); } catch (BadLocationException ee) { w.setPosition(-1); w.setVisible(true); w.setMaximum(true); w.setSelected(true); w.moveToFront(); } catch (Exception exc) {
try { if (line == -1) { w.setPosition(-1); if (currentWindow == w) { currentWindow = null; int loc = ta.getLineStartOffset(line-1); if (currentWindow != null && currentWindow != w) { currentWindow.setPosition(-1); w.setPosition(loc); currentWindow = w; if (w.isIcon()) { desk.getDesktopManager().deiconifyFrame(w); w.show(); w.toFront(); // required for correct frame layering (JDK 1.4.1) w.setSelected(true); } catch (Exception exc) {
FileWindow w = (FileWindow)obj; try { if (w.isIcon()) { w.setIcon(false); w.setVisible(true); w.moveToFront(); w.setSelected(true); } catch (Exception exc) {
/** * Toggles the breakpoint on the given line. */ public void toggleBreakPoint(int line) { if (!isBreakPoint(line)) { setBreakPoint(line); } else { clearBreakPoint(line); } }