void () { String completionBase = getCompletionBase(); if (completionBase == null) return; LookupFile file = myFinder.find(completionBase); if (file != null && file.exists() && !file.isDirectory()) { return; // we've entered a complete path already, no need to autopopup completion again (IDEA-78996) } boolean showAdText = completionBase.length() != myPathTextField.getText().length(); EmptyProgressIndicator indicator = new EmptyProgressIndicator(stateForComponent(myPathTextField)); ApplicationManager.getApplication().executeOnPooledThread(() -> { CompletionResult result = ProgressManager.getInstance().runProcess( () -> FileTextFieldUtil.processCompletion(completionBase, myFinder, myFilter, myMacroMap, _preselected), indicator); SwingUtilities.invokeLater(() -> { if (completionBase.equals(getCompletionBase())) { selectCompletionRemoveText(result, selectReplacedText); showCompletionPopup(result, isExplicitCall, showAdText); } }); }); }