Java 类com.intellij.psi.search.scope.ProjectFilesScope 实例源码

项目:intellij-ce-playground    文件:DefaultScopesProvider.java   
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);
}
项目:tools-idea    文件:DefaultScopesProvider.java   
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);
}
项目:consulo    文件:DefaultScopesProvider.java   
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);
}