void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull final CompletionResultSet result) { final Set<String> usedWords = new HashSet<>(); for (CompletionResult element : result.runRemainingContributors(parameters, true)) { usedWords.add(element.getLookupElement().getLookupString()); } PsiReference reference = parameters.getPosition().getContainingFile().findReferenceAt(parameters.getOffset()); if (reference == null || reference.isSoft()) { WordCompletionContributor.addWordCompletionVariants(result, parameters, usedWords); } }