public static JDCPopupPanel getJDCPopupPanel(JTextComponent target) { ExtEditorUI extEditorUI = getExtEditorUI(target); if (extEditorUI != null) { Completion c = extEditorUI.getCompletion(); if (c!=null) { return c.getJDCPopupPanel(); } } return null; }
public static JDCPopupPanel getJDCPopupPanel(JTextComponent target) { ExtEditorUI extEditorUI = getExtEditorUI(target); if (extEditorUI != null) { Completion c = extEditorUI.getCompletion(); if (c!=null) { return c.getJDCPopupPanel(); } } return null; }
/** Returns JavaDoc popup pane */ public JavaDocPane getJavaDocPane(){ Completion completion = extEditorUI.getCompletion(); if (completion != null){ return completion.getJDCPopupPanel().getJavaDocPane(); } if (pane == null){ pane = new ScrollJavaDocPane(extEditorUI); } return pane; }
/** Returns JavaDoc popup pane */ public JavaDocPane getJavaDocPane(){ Completion completion = extEditorUI.getCompletion(); if (completion != null){ return completion.getJDCPopupPanel().getJavaDocPane(); } if (pane == null){ pane = new ScrollJavaDocPane(extEditorUI); } return pane; }
/** * 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); } }
/** * 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); } } }
/** * 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); } } }
/** Set the visibility of the view. This method should * be used mainly for hiding the completion pane. If used * with visible set to true it calls the <tt>popup(false)</tt>. */ public void setPaneVisible(boolean visible) { trace("ENTRY setPaneVisible " + visible); // NOI18N if (visible) { if (extEditorUI.getComponent() != null) { popupImpl(false); } } else { if (pane != null) { cancelRequestImpl(); invalidateLastResult(); getJDCPopupPanel().setCompletionVisible(false); caretPos=-1; } } }
/** Set the visibility of the view. This method should * be used mainly for hiding the completion pane. If used * with visible set to true it calls the <tt>popup(false)</tt>. */ public void setPaneVisible(boolean visible) { trace("ENTRY setPaneVisible " + visible); // NOI18N if (visible) { if (extEditorUI.getComponent() != null) { popupImpl(false); } } else { if (pane != null) { cancelRequestImpl(); invalidateLastResult(); getJDCPopupPanel().setCompletionVisible(false); caretPos=-1; } } }
if((caretPos!=-1) && (Utilities.getRowStart(component,component.getCaret().getDot()) != Utilities.getRowStart(component,caretPos)) && ((component.getCaret().getDot()-caretPos)>0) ){ getJDCPopupPanel().setCompletionVisible(false); caretPos=-1; return;
if((caretPos!=-1) && (Utilities.getRowStart(component,component.getCaret().getDot()) != Utilities.getRowStart(component,caretPos)) && ((component.getCaret().getDot()-caretPos)>0) ){ getJDCPopupPanel().setCompletionVisible(false); caretPos=-1; return;