/** * Execute complegtion query subtask */ private void performQuery(final JTextComponent target) { BaseDocument doc = Utilities.getDocument(target); long start = System.currentTimeMillis(); try { lastResult = getQuery().query( target, caretPos, doc.getSyntaxSupport()); } finally { trace("performQuery took " + (System.currentTimeMillis() - start) + "ms"); // NOI18N setKeyPressed(false); } }
/** * Execute complegtion query subtask */ private void performQuery(final JTextComponent target) { BaseDocument doc = Utilities.getDocument(target); long start = System.currentTimeMillis(); try { lastResult = getQuery().query( target, caretPos, doc.getSyntaxSupport()); } finally { trace("performQuery took " + (System.currentTimeMillis() - start) + "ms"); // NOI18N 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); } } }
/** * 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); } } }