boolean (@Nullable VirtualFile file, @NotNull PsiFile containingFile) { final PsiFile currentFile = PsiDocumentManager.getInstance(myProject).getPsiFile(myEditor.getDocument()); if (currentFile == null) return true; InjectedLanguageManager manager = InjectedLanguageManager.getInstance(containingFile.getProject()); return manager.getTopLevelFile(containingFile) != manager.getTopLevelFile(currentFile); }