public DefaultScopesProvider(@NotNull Project project) { myProject = project; final NamedScope projectScope = new ProjectFilesScope(); final NamedScope nonProjectScope = new NonProjectFilesScope(); final String text = FilePatternPackageSet.SCOPE_FILE + ":*//*"; myProblemsScope = new NamedScope(IdeBundle.message("predefined.scope.problems.name"), new AbstractPackageSet(text) { @Override public boolean contains(VirtualFile file, @NotNull NamedScopesHolder holder) { return contains(file, holder.getProject(), holder); } @Override public boolean contains(VirtualFile file, @NotNull Project project, @Nullable NamedScopesHolder holder) { return project == myProject && WolfTheProblemSolver.getInstance(myProject).isProblemFile(file); } }); myScopes = Arrays.asList(projectScope, getProblemsScope(), getAllScope(), nonProjectScope); }
public DefaultScopesProvider(Project project) { myProject = project; final NamedScope projectScope = new ProjectFilesScope(); final NamedScope nonProjectScope = new NonProjectFilesScope(); final String text = FilePatternPackageSet.SCOPE_FILE + ":*//*"; myProblemsScope = new NamedScope(IdeBundle.message("predefined.scope.problems.name"), new AbstractPackageSet(text) { @Override public boolean contains(VirtualFile file, NamedScopesHolder holder) { return holder.getProject() == myProject && WolfTheProblemSolver.getInstance(myProject).isProblemFile(file); } }); myScopes = Arrays.asList(projectScope, getProblemsScope(), getAllScope(), nonProjectScope); }