private CompletionView getCompletionView(){ Completion c = extEditorUI.getCompletion(); if (c!=null){ return c.getView(); } return null; }
private CompletionView getCompletionView(){ Completion c = extEditorUI.getCompletion(); if (c!=null){ return c.getView(); } return null; }
public synchronized Object getSelectedValue() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { return lastResult.getData().get(index); } } return null; }
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 synchronized Object getSelectedValue() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0 && index<lastResult.getData().size()) { return lastResult.getData().get(index); } } return null; }
/** * 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; } }
/** * 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 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 ) { trace("ENTRY substituteText " + shift); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteText(index, shift ); } return true; } else { return false; } }
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); } } } }
/** 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; } }
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().pageDown(); } else { super.actionPerformed(evt, target); } } } }
/** 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 ) { trace("ENTRY substituteText " + shift); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteText(index, shift ); } return true; } else { return false; } }
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); } } }
/** * 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); } }
/** * 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 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; } } });