public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpNext(target); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpNextComponent(target); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpPrev(target); } } }
private static void doToggle(final DataObject toggled) { // check if the data object has possibility to be opened in editor final OpenCookie oc = toggled.getLookup().lookup(OpenCookie.class); if (oc != null) { // remember current caret position JTextComponent textComponent = EditorRegistry.lastFocusedComponent(); JumpList.checkAddEntry(textComponent); // try to open ASAP, but better not in EQ RP.post(new Runnable() { @Override public void run() { // open component oc.open(); } }, 0, Thread.MAX_PRIORITY); } }
public static void checkAddEntry(JTextComponent c, int pos) { if (currentEntry == null || currentEntry.getComponent() != c || currentEntry.getPosition() != pos) { addEntry(c, pos); } }
public static void addEntry(JTextComponent c, int pos) { try { Entry e = new Entry(c, pos, currentEntry); currentEntry = e; if (++checkCnt >= CHECK_COUNT) { // perform size check sizeCheck(); } } catch (BadLocationException e) { // entry not added } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpPrevComponent(target); } } }
public static void checkAddEntry(JTextComponent c) { checkAddEntry(c, c.getCaret().getDot()); }
public static void checkAddEntry(JTextComponent c, int pos) { if (currentEntry == null || currentEntry.getComponent() != c || currentEntry.getPosition() != pos ) { addEntry(c, pos); } }
public static void addEntry(JTextComponent c, int pos) { try { Entry e = new Entry(c, pos, currentEntry); currentEntry = e; if (++checkCnt >= CHECK_COUNT) { // perform size check sizeCheck(); } } catch (BadLocationException e) { // entry not added } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpPrevComponent(target); } } }
public static void checkAddEntry(JTextComponent c) { checkAddEntry(c, c.getCaret().getDot()); }
/** Add the line offset into the jump history */ private void addPositionToJumpList(String url, Line l, int column) { DataObject dataObject = getDataObject(url); if (dataObject != null) { EditorCookie ec = dataObject.getLookup().lookup(EditorCookie.class); if (ec != null) { try { StyledDocument doc = ec.openDocument(); JEditorPane[] eps = ec.getOpenedPanes(); if (eps != null && eps.length > 0) { JumpList.addEntry(eps[0], NbDocument.findLineOffset(doc, l.getLineNumber()) + column); } } catch (java.io.IOException ioex) { ErrorManager.getDefault().notify(ioex); } } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpNextComponent(target); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpNext(target); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { JumpList.jumpPrev(target); } } }
public static void checkAddEntry() { JTextComponent c = Utilities.getLastActiveComponent(); if (c != null) { checkAddEntry(c, c.getCaret().getDot()); } }
/** Add the line offset into the jump history */ private void addPositionToJumpList(String url, Line l, int column) { DataObject dataObject = getDataObject (url); if (dataObject != null) { EditorCookie ec = dataObject.getLookup().lookup(EditorCookie.class); if (ec != null) { try { StyledDocument doc = ec.openDocument(); JEditorPane[] eps = ec.getOpenedPanes(); if (eps != null && eps.length > 0) { JumpList.addEntry(eps[0], NbDocument.findLineOffset(doc, l.getLineNumber()) + column); } } catch (java.io.IOException ioex) { ErrorManager.getDefault().notify(ioex); } } } }
public static void checkAddEntry() { JTextComponent c = Utilities.getLastActiveComponent(); if (c != null) { checkAddEntry(c, c.getCaret().getDot()); } }
/** Add the line offset into the jump history */ private void addPositionToJumpList(String url, Line l, int column) { DataObject dataObject = getDataObject (url); if (dataObject != null) { EditorCookie ec = dataObject.getLookup().lookup(EditorCookie.class); if (ec != null) { try { StyledDocument doc = ec.openDocument(); JEditorPane[] eps = ec.getOpenedPanes(); if (eps != null && eps.length > 0) { JumpList.addEntry(eps[0], NbDocument.findLineOffset(doc, l.getLineNumber()) + column); } } catch (java.io.IOException ioex) { ErrorManager.getDefault().notify(ioex); } } } }