mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-207762 cleanup CodeCompletionHandlerBase
GitOrigin-RevId: bf5bf9387e49a1301468f4b045e6183eb42d1a1f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
801e5dfa34
commit
fff008b4d4
+4
-2
@@ -219,7 +219,8 @@ public class CodeCompletionHandlerBase {
|
||||
|
||||
boolean hasValidContext = context != null;
|
||||
if (!hasValidContext) {
|
||||
PsiFile psiFile = PsiUtilBase.getPsiFileInEditor(caret, project);
|
||||
PsiFile psiFile = Objects.requireNonNull(PsiUtilBase.getPsiFileInEditor(caret, project),
|
||||
"PsiFile must exist here, otherwise completion won't even come here");
|
||||
context = new CompletionInitializationContextImpl(editor, caret, psiFile, completionType, effectiveInvocationCount);
|
||||
}
|
||||
|
||||
@@ -629,7 +630,8 @@ public class CodeCompletionHandlerBase {
|
||||
context = lastContext.get();
|
||||
}
|
||||
else {
|
||||
PsiFile psiFile = PsiUtilBase.getPsiFileInEditor(editor, project);
|
||||
PsiFile psiFile = Objects.requireNonNull(PsiUtilBase.getPsiFileInEditor(editor, project),
|
||||
"PsiFile must exist here, otherwise completion won't even come here");
|
||||
context = insertItem(items, item, completionChar, editor, psiFile, caretOffset, idEndOffset, offsetMap);
|
||||
}
|
||||
return context;
|
||||
|
||||
Reference in New Issue
Block a user