Result (char c, int prefixLength, @NotNull Lookup lookup) { if (!lookup.isCompletion()) return null; PsiFile file = lookup.getPsiFile(); if (file == null) return null; TextCompletionProvider provider = TextCompletionUtil.getProvider(file); if (provider != null) return provider.acceptChar(c); return null; }