boolean () { if (!myLookup.isLookupDisposed() && isAutopopupCompletion() && !myLookup.isSelectionTouched() && !myLookup.isCalculating()) { myLookup.refreshUi(true, false); final List<LookupElement> items = myLookup.getItems(); for (LookupElement item : items) { if (!isAlreadyInTheEditor(item)) { return false; } if (item.isValid() && item.isWorthShowingInAutoPopup()) { return false; } } myLookup.hideLookup(false); LOG.assertTrue(CompletionServiceImpl.getCompletionService().getCurrentCompletion() == null); CompletionServiceImpl.setCompletionPhase(new CompletionPhase.EmptyAutoPopup(myEditor, myRestartingPrefixConditions)); return true; } return false; }