public abstract class NonClasspathClassFinder extends PsiElementFinder
| Modifier and Type | Field and Description |
|---|---|
protected Project |
myProject |
EP, EP_NAME| Constructor and Description |
|---|
NonClasspathClassFinder(Project project,
java.lang.String... fileExtensions) |
| Modifier and Type | Method and Description |
|---|---|
static GlobalSearchScope |
addNonClasspathScope(Project project,
GlobalSearchScope base) |
protected abstract java.util.List<VirtualFile> |
calcClassRoots() |
void |
clearCache() |
protected static PackageDirectoryCache |
createCache(java.util.List<? extends VirtualFile> roots)
Deprecated.
|
PsiClass |
findClass(java.lang.String qualifiedName,
GlobalSearchScope scope)
Searches the specified scope within the project for a class with the specified full-qualified
name and returns one if it is found.
|
PsiClass [] |
findClasses(java.lang.String qualifiedName,
GlobalSearchScope scope)
Searches the specified scope within the project for classes with the specified full-qualified
name and returns all found classes.
|
PsiPackage |
findPackage(java.lang.String qualifiedName)
Searches the project for the package with the specified full-qualified name and returns one
if it is found.
|
protected PackageDirectoryCache |
getCache(GlobalSearchScope scope) |
PsiClass [] |
getClasses(PsiPackage psiPackage,
GlobalSearchScope scope)
Returns the list of classes in the specified package and in the specified search scope.
|
java.util.Set<java.lang.String> |
getClassNames(PsiPackage psiPackage,
GlobalSearchScope scope)
A method to optimize resolve (to only search classes in a package which might be there)
|
java.util.List<VirtualFile> |
getClassRoots() |
protected java.util.List<VirtualFile> |
getClassRoots(GlobalSearchScope scope) |
PsiManager |
getPsiManager() |
PsiPackage [] |
getSubPackages(PsiPackage psiPackage,
GlobalSearchScope scope)
Returns the list of subpackages of the specified package in the specified search scope.
|
boolean |
processPackageDirectories(PsiPackage psiPackage,
GlobalSearchScope scope,
Processor<? super PsiDirectory> consumer,
boolean includeLibrarySources) |
filterByName, getClasses, getClassesFilter, getClassNames, getPackageFiles, getPackageFilesFilter, processPackageDirectoriesprotected final Project myProject
public NonClasspathClassFinder(Project project, java.lang.String... fileExtensions)
protected PackageDirectoryCache getCache(GlobalSearchScope scope)
@Deprecated protected static PackageDirectoryCache createCache(java.util.List<? extends VirtualFile> roots)
PackageDirectoryCache.createCache(List)public void clearCache()
protected java.util.List<VirtualFile> getClassRoots(GlobalSearchScope scope)
public java.util.List<VirtualFile> getClassRoots()
public PsiClass findClass(java.lang.String qualifiedName, GlobalSearchScope scope)
PsiElementFinderfindClass in class PsiElementFinderqualifiedName - the full-qualified name of the class to find.scope - the scope to search.JavaPsiFacade.findClass(String, GlobalSearchScope)protected abstract java.util.List<VirtualFile> calcClassRoots()
public PsiClass [] getClasses(PsiPackage psiPackage, GlobalSearchScope scope)
PsiElementFindergetClasses in class PsiElementFinderpsiPackage - the package to return the list of classes in.scope - the scope in which classes are searched.PsiPackage.getClasses(GlobalSearchScope)public java.util.Set<java.lang.String> getClassNames(PsiPackage psiPackage, GlobalSearchScope scope)
PsiElementFindergetClassNames in class PsiElementFinderpublic PsiPackage findPackage(java.lang.String qualifiedName)
PsiElementFinderfindPackage in class PsiElementFinderqualifiedName - the full-qualified name of the package to find.JavaPsiFacade.findPackage(String)public boolean processPackageDirectories(PsiPackage psiPackage, GlobalSearchScope scope, Processor<? super PsiDirectory> consumer, boolean includeLibrarySources)
processPackageDirectories in class PsiElementFinderpublic PsiPackage [] getSubPackages(PsiPackage psiPackage, GlobalSearchScope scope)
PsiElementFindergetSubPackages in class PsiElementFinderpsiPackage - the package to return the list of subpackages for.scope - the scope in which subpackages are searched.PsiPackage.getSubPackages(GlobalSearchScope)public PsiClass [] findClasses(java.lang.String qualifiedName, GlobalSearchScope scope)
PsiElementFinderfindClasses in class PsiElementFinderqualifiedName - the full-qualified name of the class to find.scope - the scope to search.JavaPsiFacade.findClasses(String, GlobalSearchScope)public static GlobalSearchScope addNonClasspathScope(Project project, GlobalSearchScope base)
public PsiManager getPsiManager()