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) { checkAddEntry(c, c.getCaret().getDot()); }
public static void checkAddEntry(JTextComponent c) { checkAddEntry(c, c.getCaret().getDot()); }
public static void checkAddEntry() { JTextComponent c = Utilities.getLastActiveComponent(); if (c != null) { checkAddEntry(c, c.getCaret().getDot()); } }
public static void checkAddEntry() { JTextComponent c = Utilities.getLastActiveComponent(); if (c != null) { checkAddEntry(c, c.getCaret().getDot()); } }
public void run() { JumpList.checkAddEntry(); JEditorPane pane = NbDocument.findRecentEditorPane(ec); boolean opened = true; if (pane == null) { ec.open(); opened = false; JEditorPane[] panes = ec.getOpenedPanes(); pane = panes != null && panes.length > 0? panes[0] : null ; } if (pane != null){ jumpToLine(pane, lineInfo, !opened); } } });
@Override public void run() { JumpList.checkAddEntry(); JEditorPane pane = findRecentEditorPaneInEQ(ec); if (pane != null) { //editor already opened, so just select selectElementInPane(pane, element, false); } else { PropertyChangeListenerImpl l = new PropertyChangeListenerImpl(ec, element); // editor not yet opened, attach listener and open from there ec.addPropertyChangeListener(l); ec.open(); // run anyway, ec might be redirected into already opened pane for symlinked file l.run(); } }
public static boolean openSource(PositionBounds position) { CloneableEditorSupport editorSupport = position.getBegin().getCloneableEditorSupport(); editorSupport.edit(); JEditorPane[] panes = editorSupport.getOpenedPanes(); if (panes != null) { JumpList.checkAddEntry(); JEditorPane pane = panes[0]; pane.setCaretPosition(position.getBegin().getOffset()); Container container = pane; while (container != null && !(container instanceof TopComponent)) { container = container.getParent(); } if (container != null) { ((TopComponent) container).requestActive(); } } return false; }
JumpList.checkAddEntry(); editorUI.getComponent().getCaret().setDot(offset);
offset = Utilities.getRowStartFromLineOffset(doc, line); if (editorUI.getComponent().getCaret().getDot() != offset) JumpList.checkAddEntry(); editorUI.getComponent().getCaret().setDot(offset); JPopupMenu pm = annos.createPopupMenu(Utilities.getKit(editorUI.getComponent()), line);
JumpList.checkAddEntry(); editorUI.getComponent().getCaret().setDot(offset); offset = Utilities.getRowStartFromLineOffset(doc, line); if (editorUI.getComponent().getCaret().getDot() != offset) JumpList.checkAddEntry(); editorUI.getComponent().getCaret().setDot(offset); JPopupMenu pm = annos.createPopupMenu(Utilities.getKit(editorUI.getComponent()), line);
JumpList.checkAddEntry(target);
JumpList.checkAddEntry(target);
JumpList.checkAddEntry(); String msg = exp + LocaleSupport.getString(FOUND_LOCALE) + ' ' + Utilities.debugPosition((BaseDocument)c.getDocument(), blk[0]);
JumpList.checkAddEntry(); String msg = exp + LocaleSupport.getString(FOUND_LOCALE) + ' ' + Utilities.debugPosition((BaseDocument) c.getDocument(), blk[0]); if (blk[2] == 1) { // wrap was done