CompletionResultSet (@NotNull CompletionResultSet result, @NotNull String prefix) { CompletionResultSet activeResult = result; if (!activeResult.getPrefixMatcher().getPrefix().equals(prefix)) { activeResult = activeResult.withPrefixMatcher(prefix); } if (isCaseInsensitivity()) { activeResult = activeResult.caseInsensitive(); } return activeResult; }