void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet _result) { if (parameters.getCompletionType() != CompletionType.BASIC) { return; } CompletionData completionData = getCompletionData(parameters); if (completionData == null) return; final PsiElement insertedElement = parameters.getPosition(); final CompletionResultSet result = _result.withPrefixMatcher(completionData.findPrefix(insertedElement, parameters.getOffset())); completeReference(parameters, result); if (DumbService.isDumb(insertedElement.getProject())) return; final Set<LookupElement> lookupSet = new LinkedHashSet<>(); final Set<CompletionVariant> keywordVariants = new HashSet<>(); PsiFile file = parameters.getOriginalFile(); completionData.addKeywordVariants(keywordVariants, insertedElement, file); completionData.completeKeywordsBySet(lookupSet, keywordVariants); result.addAllElements(lookupSet); }