public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { completion.getView().down(); } else { super.actionPerformed(evt, target); } } } }
public synchronized Object getSelectedValue() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { return lastResult.getData().get(index); } } return null; }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { completion.getView().pageDown(); } else { super.actionPerformed(evt, target); } } } }
case ACTION_COMPLETION_UP: if (completion.isVisible()){ getCompletionView().up(); }else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0)); case ACTION_COMPLETION_DOWN: if (completion.isVisible()){ getCompletionView().down(); }else { performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0)); case ACTION_COMPLETION_PGUP: if (completion.isVisible()){ getCompletionView().pageUp(); } else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0)); case ACTION_COMPLETION_PGDN: if (completion.isVisible()){ getCompletionView().pageDown(); }else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0)); case ACTION_COMPLETION_BEGIN: if (completion.isVisible()){ getCompletionView().begin(); }else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0));
/** * Show wait completion result. Always called from AWT. */ private void performWait() { getPane().setTitle(NbBundle.getBundle(org.netbeans.editor.BaseKit.class).getString("ext.Completion.wait")); getView().setResult((CompletionQuery.Result)null); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { completion.getView().pageUp(); } else { super.actionPerformed(evt, target); } } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { completion.getView().up(); } else { super.actionPerformed(evt, target); } } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { if (select) { completion.setPaneVisible(false); } else { completion.getView().end(); return; } } super.actionPerformed(evt, target); } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Completion completion = ExtUtilities.getCompletion(target); if (completion != null && completion.isPaneVisible()) { if (select) { completion.setPaneVisible(false); } else { completion.getView().begin(); return; } } super.actionPerformed(evt, target); } } }
case ACTION_COMPLETION_UP: if (completion.isVisible()){ getCompletionView().up(); }else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0)); case ACTION_COMPLETION_DOWN: if (completion.isVisible()){ getCompletionView().down(); }else { performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0)); case ACTION_COMPLETION_PGUP: if (completion.isVisible()){ getCompletionView().pageUp(); } else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0)); case ACTION_COMPLETION_PGDN: if (completion.isVisible()){ getCompletionView().pageDown(); }else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0)); case ACTION_COMPLETION_BEGIN: if (completion.isVisible()){ getCompletionView().begin(); }else{ performJavaDocAction(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0));
/** * Show wait completion result. Always called from AWT. */ private void performWait() { getPane().setTitle(LocaleSupport.getString("ext.Completion.wait")); getView().setResult((CompletionQuery.Result)null); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } }
public synchronized Object getSelectedValue() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0 && index<lastResult.getData().size()) { return lastResult.getData().get(index); } } return null; }
public void run() { CompletionQuery.Result res = lastResult; if (res != null) { getPane().setTitle(res.getTitle()); getView().setResult(res); if (isPaneVisible()) { getPane().refresh(); } else { getPane().setVisible(true); } } else { getPane().setVisible(false); caretPos = -1; } } });
public synchronized Object getSelectedValue() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0 && index<lastResult.getData().size()) { return lastResult.getData().get(index); } } return null; }
/** * Show result popup. Always called from AWT. */ protected void performResults() { // sample CompletionQuery.Result res = lastResult; if (res != null) { if (instantSubstitution && res.getData().size() == 1 && !isPaneVisible() && instantSubstitution(caretPos)) return; getPane().setTitle(res.getTitle()); getView().setResult(res); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } } else { getJDCPopupPanel().setCompletionVisible(false); if (!isKeyPressed()) { caretPos=-1; } else { setKeyPressed(false); } } }
/** * Substitute the document's text with the text that is appopriate for the * selection in the view. This function is usually triggered upon pressing * the Enter key. * * @return true if the substitution was performed false if not. */ public synchronized boolean substituteText(boolean shift) { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteText(index, shift); } return true; } else { return false; } }
/** * Show result popup. Always called from AWT. */ protected void performResults() { // sample CompletionQuery.Result res = lastResult; if (res != null) { if (instantSubstitution && res.getData().size() == 1 && !isPaneVisible() && instantSubstitutionImpl(caretPos)) return; getPane().setTitle(res.getTitle()); getView().setResult(res); if (isPaneVisible()) { getJDCPopupPanel().refresh(); } else { getJDCPopupPanel().setCompletionVisible(true); } } else { getJDCPopupPanel().setCompletionVisible(false); if (!isKeyPressed()) { caretPos=-1; } else { setKeyPressed(false); } } }
/** * Substitute the text with the longest common part of all the entries * appearing in the view. This function is usually triggered upon pressing * the Tab key. * * @return true if the substitution was performed false if not. */ public synchronized boolean substituteCommonText() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteCommonText(index); } return true; } else { return false; } }
/** Substitute the text with the longest common * part of all the entries appearing in the view. * This function is usually triggered * upon pressing the Tab key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteCommonText() { trace("ENTRY substituteCommonText"); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteCommonText(index); } return true; } else { return false; } }
/** Substitute the text with the longest common * part of all the entries appearing in the view. * This function is usually triggered * upon pressing the Tab key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteCommonText() { trace("ENTRY substituteCommonText"); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteCommonText(index); } return true; } else { return false; } }