public class AnalysisScope
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AnalysisScope.Type |
Modifier and Type | Field and Description |
---|---|
static int |
CUSTOM |
static int |
DIRECTORY |
static int |
FILE |
static int |
INVALID |
static int |
MODULE |
static int |
MODULES |
protected PsiElement |
myElement |
protected Module |
myModule |
protected java.util.List<Module> |
myModules |
protected int |
myType |
protected static int |
PACKAGE |
static int |
PROJECT |
static int |
UNCOMMITTED_FILES |
static int |
VIRTUAL_FILES |
Constructor and Description |
---|
AnalysisScope(Module module) |
AnalysisScope(Module [] modules) |
AnalysisScope(Project project) |
AnalysisScope(Project project,
java.util.Collection<? extends VirtualFile> virtualFiles) |
AnalysisScope(PsiDirectory psiDirectory) |
AnalysisScope(PsiFile psiFile) |
AnalysisScope(SearchScope scope,
Project project) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Processor<? super VirtualFile> processor) |
protected boolean |
accept(PsiDirectory dir,
Processor<? super VirtualFile> processor) |
void |
accept(PsiElementVisitor visitor) |
void |
acceptIdempotentVisitor(PsiElementVisitor visitor)
A drop-in replacement for
accept(PsiElementVisitor) that invokes the visitor in a non-blocking cancellable read action,
so that the visitor can be interrupted and restarted several times on the same file. |
protected static AnalysisScope |
collectScopes(Project defaultProject,
java.util.Set<? extends Module> modules) |
boolean |
contains(PsiElement psiElement) |
boolean |
contains(VirtualFile file) |
boolean |
containsModule(Module module) |
boolean |
containsSources(boolean isTest) |
protected PsiElementVisitor |
createFileSearcher(java.util.Collection<? super VirtualFile> addTo) |
protected java.util.Set<VirtualFile> |
createFilesSet() |
protected static java.util.HashSet<Module> |
getAllInterestingModules(ProjectFileIndex fileIndex,
VirtualFile vFile) |
java.lang.String |
getDisplayName() |
PsiElement |
getElement() |
int |
getFileCount() |
java.util.Set<VirtualFile> |
getFiles() |
Module |
getModule() |
java.util.List<Module> |
getModules() |
AnalysisScope |
getNarrowedComplementaryScope(Project defaultProject) |
Project |
getProject() |
int |
getScopeType() |
java.lang.String |
getShortenName() |
void |
invalidate() |
boolean |
isIncludeTestSource() |
boolean |
isValid() |
void |
setFilter(GlobalSearchScope filter) |
void |
setIncludeTestSource(boolean includeTestSource) |
void |
setSearchInLibraries(boolean searchInLibraries) |
SearchScope |
toSearchScope() |
java.lang.String |
toString() |
public static final int PROJECT
public static final int DIRECTORY
public static final int FILE
public static final int MODULE
protected static final int PACKAGE
public static final int INVALID
public static final int MODULES
public static final int CUSTOM
public static final int VIRTUAL_FILES
public static final int UNCOMMITTED_FILES
protected java.util.List<Module> myModules
protected Module myModule
protected PsiElement myElement
protected int myType
public AnalysisScope(Project project)
public AnalysisScope(Module module)
public AnalysisScope(Module [] modules)
public AnalysisScope(PsiDirectory psiDirectory)
public AnalysisScope(PsiFile psiFile)
public AnalysisScope(SearchScope scope, Project project)
public AnalysisScope(Project project, java.util.Collection<? extends VirtualFile> virtualFiles)
public void setSearchInLibraries(boolean searchInLibraries)
public void setIncludeTestSource(boolean includeTestSource)
protected PsiElementVisitor createFileSearcher(java.util.Collection<? super VirtualFile> addTo)
public boolean contains(PsiElement psiElement)
public boolean contains(VirtualFile file)
protected java.util.Set<VirtualFile> createFilesSet()
public void accept(PsiElementVisitor visitor)
public void acceptIdempotentVisitor(PsiElementVisitor visitor)
accept(PsiElementVisitor)
that invokes the visitor in a non-blocking cancellable read action,
so that the visitor can be interrupted and restarted several times on the same file.
The visitor must support this workflow, i.e. be idempotent.public boolean accept(Processor<? super VirtualFile> processor)
public boolean containsModule(Module module)
protected boolean accept(PsiDirectory dir, Processor<? super VirtualFile> processor)
public boolean isValid()
public int getScopeType()
public java.lang.String getDisplayName()
public java.lang.String getShortenName()
public Project getProject()
public Module getModule()
public java.util.List<Module> getModules()
public PsiElement getElement()
public java.util.Set<VirtualFile> getFiles()
public int getFileCount()
public void invalidate()
public boolean containsSources(boolean isTest)
public AnalysisScope getNarrowedComplementaryScope(Project defaultProject)
protected static AnalysisScope collectScopes(Project defaultProject, java.util.Set<? extends Module> modules)
protected static java.util.HashSet<Module> getAllInterestingModules(ProjectFileIndex fileIndex, VirtualFile vFile)
public SearchScope toSearchScope()
public boolean isIncludeTestSource()
public void setFilter(GlobalSearchScope filter)
public java.lang.String toString()
toString
in class java.lang.Object