Editor (@Nullable Editor editor, @Nullable PsiFile file) { if (editor == null || file == null || editor instanceof EditorWindow) return editor; int offset = editor.getCaretModel().getOffset(); return getEditorForInjectedLanguageNoCommit(editor, file, offset); }