Editor (@Nullable Editor editor, @Nullable Caret caret, @Nullable PsiFile file) { if (editor == null || file == null || editor instanceof EditorWindow || caret == null) return editor; PsiFile injectedFile = findInjectedPsiNoCommit(file, caret.getOffset()); return getInjectedEditorForInjectedFile(editor, caret, injectedFile); }