GlobalSearchScope (@NotNull Project project) { FileEditorManager fileEditorManager = FileEditorManager.getInstance(project); final VirtualFile[] files = fileEditorManager != null ? fileEditorManager.getOpenFiles() : VirtualFile.EMPTY_ARRAY; return GlobalSearchScope.filesScope(project, Arrays.asList(files), IdeBundle.message("scope.open.files")); }