public synchronized Object getSelectedValue() { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { return lastResult.getData().get(index); } } return null; }
if (c!=null){ CompletionQuery.Result result = c.getLastResult(); int resultSize = (result == null) ? -1 : result.getData().size(); if (lastSize!=resultSize || !isVisible() || docv){ extEditorUI.getPopupManager().install(this);
if (c!=null){ CompletionQuery.Result result = c.getLastResult(); int resultSize = (result == null) ? -1 : result.getData().size(); if (lastSize!=resultSize || !isVisible() || docv){ extEditorUI.getPopupManager().install(this);
/** * 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); } } }
/** Populate the view with the result from a query. */ public void setResult(CompletionQuery.Result result) { if (result != null) { setResult(result.getData()); } else { setResult(Collections.EMPTY_LIST); } }
/** Populate the view with the result from a query. */ public void setResult(CompletionQuery.Result result) { if (result != null) { setResult(result.getData()); } else { setResult(Collections.EMPTY_LIST); } }
/** Populate the view with the result from a query. */ public void setResult(CompletionQuery.Result result) { if (result != null) { setResult(result.getData()); } }