|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FileIndex
Provides information about files contained in a project or module.
ProjectRootManager.getFileIndex(),
ModuleRootManager.getFileIndex()| Method Summary | |
|---|---|
VirtualFile[] |
getDirectoriesByPackageName(java.lang.String packageName,
boolean includeLibrarySources)
Returns all directories in content sources and libraries (and optionally library sources) corresponding to the given package name. |
boolean |
isContentJavaSourceFile(VirtualFile file)
Returns true if file is a java source file which belongs to sources of the content. |
boolean |
isInContent(VirtualFile fileOrDir)
Returns true if fileOrDir is a file or directory under a content root of this
project or module. |
boolean |
isInSourceContent(VirtualFile fileOrDir)
Returns true if fileOrDir is a file or directory from the content source. |
boolean |
isInTestSourceContent(VirtualFile fileOrDir)
Returns true if fileOrDir is a file or directory from the test content source |
boolean |
iterateContent(ContentIterator iterator)
Iterates all files and directories in the content. |
boolean |
iterateContentUnderDirectory(VirtualFile dir,
ContentIterator iterator)
Iterates all files and directories in the content under directory dir (including the directory itself). |
| Method Detail |
|---|
boolean iterateContent(ContentIterator iterator)
iterator - the iterator receiving the files.
ContentIterator.processFile(VirtualFile) returned false)
boolean iterateContentUnderDirectory(VirtualFile dir,
ContentIterator iterator)
dir (including the directory itself).
Does not iterate anything if dir is not in the content.
dir - the directory the contents of which is iterated.iterator - the iterator receiving the files.
ContentIterator.processFile(VirtualFile) returned false)boolean isInContent(VirtualFile fileOrDir)
fileOrDir is a file or directory under a content root of this
project or module.
fileOrDir - the file or directory to check.
boolean isContentJavaSourceFile(VirtualFile file)
file is a java source file which belongs to sources of the content.
Note that sometimes a java file can belong to the content and be a source file but not belong to sources of the content.
This happens if sources of some library are located under the content (so they belong to the project content but not as sources).
file - the file to check.
boolean isInSourceContent(VirtualFile fileOrDir)
fileOrDir is a file or directory from the content source.
(Returns true for both source and test source).
fileOrDir - the file or directory to check.
boolean isInTestSourceContent(VirtualFile fileOrDir)
fileOrDir is a file or directory from the test content source
fileOrDir - the file or directory to check.
VirtualFile[] getDirectoriesByPackageName(java.lang.String packageName,
boolean includeLibrarySources)
packageName - the name of the package for which directories are requested.includeLibrarySources - if true, directories under library sources are included in the returned list.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||