void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { if (endsWithDot(parameters)) return; Collection<String> kws = new SmartList<>(); PsiElement original = parameters.getOriginalPosition(); if (original == null || !original.getText().contains("/")) { result.addAllElements(ContainerUtil.map(BUILTIN, s -> PrioritizedLookupElement.withPriority(LookupElementBuilder .create(s) .withIcon( IconManager.getInstance().getPlatformIcon(com.intellij.ui.PlatformIcons.Function)) .withInsertHandler( AddSpaceInsertHandler.INSTANCE), BUILTIN_PRIORITY))); kws = suggestKeywords(parameters.getPosition()); for (String keywords : kws) { result.addElement(LookupElementBuilder.create(keywords).bold().withInsertHandler(AddSpaceInsertHandler.INSTANCE)); } } kws.addAll(BUILTIN); Arrays.stream(ShTokenTypes.HUMAN_READABLE_KEYWORDS.getTypes()).map(IElementType::toString).forEach(kws::add); String prefix = CompletionUtil.findJavaIdentifierPrefix(parameters); if (prefix.isEmpty() && parameters.isAutoPopup()) { return; } CompletionResultSet resultSetWithPrefix = result.withPrefixMatcher(prefix); WordCompletionContributor.addWordCompletionVariants(resultSetWithPrefix, parameters, new HashSet<>(kws)); }