/** Performs instant text substitution, provided that result contains only one * item and completion has been invoked at the end of the word. * @param caretPos offset position of the caret */ public boolean instantSubstitution(int caretPos){ trace("ENTRY instantSubstitution " + caretPos); // NOI18N return instantSubstitutionImpl(caretPos); }
/** Performs instant text substitution, provided that result contains only one * item and completion has been invoked at the end of the word. * @param caretPos offset position of the caret */ public boolean instantSubstitution(int caretPos){ trace("ENTRY instantSubstitution " + caretPos); // NOI18N return instantSubstitutionImpl(caretPos); }
/** * 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); } } }