Editor () { DocumentWindow documentWindow = getInjectedDocument(myProject, myEditor, myEditor.getCaretModel().getOffset()); if (documentWindow != null) { PsiFile injectedFile = PsiDocumentManager.getInstance(myProject).getPsiFile(documentWindow); return InjectedLanguageUtil.getInjectedEditorForInjectedFile(myEditor, injectedFile); } return myEditor; }