void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { if (inCommentOrLiteral(parameters)) { return; } FileType fileType = parameters.getOriginalFile().getFileType(); if (!(fileType instanceof CustomSyntaxTableFileType)) { return; } SyntaxTable syntaxTable = ((CustomSyntaxTableFileType)fileType).getSyntaxTable(); String prefix = CompletionUtil.findJavaIdentifierPrefix(parameters); if (prefix.isEmpty() && parameters.isAutoPopup()) { return; } CompletionResultSet resultSetWithPrefix = result.withPrefixMatcher(prefix); addVariants(resultSetWithPrefix, syntaxTable.getKeywords1()); addVariants(resultSetWithPrefix, syntaxTable.getKeywords2()); addVariants(resultSetWithPrefix, syntaxTable.getKeywords3()); addVariants(resultSetWithPrefix, syntaxTable.getKeywords4()); WordCompletionContributor.addWordCompletionVariants(resultSetWithPrefix, parameters, Collections.emptySet()); }