SearchScope (VirtualFile file) { PsiFile currentFile = PsiDocumentManager.getInstance(myProject).getPsiFile(myEditor.getDocument()); return currentFile != null ? new LocalSearchScope(currentFile) : ProjectScope.getProjectScope(myProject); }