|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProjectFileIndex
Provides information about files contained in a project.
ProjectRootManager.getFileIndex()| Method Summary | |
|---|---|
VirtualFile |
getClassRootForFile(VirtualFile file)
Returns a classpath entry to which the specified file or directory belongs. |
VirtualFile |
getContentRootForFile(VirtualFile file)
Returns the module content root to which the specified file or directory belongs. |
Module |
getModuleForFile(VirtualFile file)
Returns module to which the specified file belongs. |
OrderEntry[] |
getOrderEntriesForFile(VirtualFile file)
Returns the order entries which contain the specified file (either in CLASSES or SOURCES). |
java.lang.String |
getPackageNameByDirectory(VirtualFile dir)
Returns the name of the package corresponding to the specified directory. |
VirtualFile |
getSourceRootForFile(VirtualFile file)
Returns the module source root or library source root to which the specified file or directory belongs. |
boolean |
isIgnored(VirtualFile file)
Checks if the specified file or directory is ignored (either excluded by exclude roots or ignored by FileTypeManager.isFileIgnored(String)). |
boolean |
isInLibraryClasses(VirtualFile fileOrDir)
Returns true if fileOrDir is a file or directory from library classes. |
boolean |
isInLibrarySource(VirtualFile fileOrDir)
Returns true if fileOrDir is a file or directory from library source. |
boolean |
isInSource(VirtualFile fileOrDir)
Returns true if fileOrDir is a file or directory from the content source or library sources. |
boolean |
isJavaSourceFile(VirtualFile file)
Returns true if file is a Java source file which is treated as source
(that is either project source or library source) |
boolean |
isLibraryClassFile(VirtualFile file)
Returns true if file is a compiled class file which belongs to some library. |
| Methods inherited from interface com.intellij.openapi.roots.FileIndex |
|---|
getDirectoriesByPackageName, isContentJavaSourceFile, isInContent, isInSourceContent, isInTestSourceContent, iterateContent, iterateContentUnderDirectory |
| Method Detail |
|---|
@Nullable Module getModuleForFile(VirtualFile file)
@NotNull OrderEntry[] getOrderEntriesForFile(VirtualFile file)
@Nullable VirtualFile getClassRootForFile(VirtualFile file)
file - the file or directory for which the information is requested.
@Nullable VirtualFile getSourceRootForFile(VirtualFile file)
file - the file or directory for which the information is requested.
@Nullable VirtualFile getContentRootForFile(VirtualFile file)
file - the file or directory for which the information is requested.
@Nullable java.lang.String getPackageNameByDirectory(VirtualFile dir)
dir - the directory for which the package name is requested.
boolean isJavaSourceFile(VirtualFile file)
file is a Java source file which is treated as source
(that is either project source or library source)
file - the file to check.
boolean isLibraryClassFile(VirtualFile file)
file is a compiled class file which belongs to some library.
file - the file to check.
boolean isInSource(VirtualFile fileOrDir)
fileOrDir is a file or directory from the content source or library sources.
fileOrDir - the file or directory to check.
boolean isInLibraryClasses(VirtualFile fileOrDir)
fileOrDir is a file or directory from library classes.
fileOrDir - the file or directory to check.
boolean isInLibrarySource(VirtualFile fileOrDir)
fileOrDir is a file or directory from library source.
fileOrDir - the file or directory to check.
boolean isIgnored(VirtualFile file)
FileTypeManager.isFileIgnored(String)).
file - the file to check.
file is ignored, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||