public interface ContentEntry extends Synthetic
ModuleRootModel.getContentEntries()
or
create a new one with ModifiableRootModel.addContentEntry(VirtualFile)
.Modifier and Type | Method and Description |
---|---|
ExcludeFolder |
addExcludeFolder(java.lang.String url)
Adds an exclude root under the content root.
|
ExcludeFolder |
addExcludeFolder(VirtualFile file)
Adds an exclude root under the content root.
|
void |
addExcludePattern(java.lang.String pattern) |
SourceFolder |
addSourceFolder(java.lang.String url,
boolean isTestSource)
Adds a source or test source root under the content root.
|
<P extends JpsElement> |
addSourceFolder(java.lang.String url,
JpsModuleSourceRootType<P> type) |
<P extends JpsElement> |
addSourceFolder(java.lang.String url,
JpsModuleSourceRootType<P> type,
P properties) |
SourceFolder |
addSourceFolder(VirtualFile file,
boolean isTestSource)
Adds a source or test source root under the content root.
|
SourceFolder |
addSourceFolder(VirtualFile file,
boolean isTestSource,
java.lang.String packagePrefix)
Adds a source or test source root with the specified package prefix under the content root.
|
<P extends JpsElement> |
addSourceFolder(VirtualFile file,
JpsModuleSourceRootType<P> type) |
<P extends JpsElement> |
addSourceFolder(VirtualFile file,
JpsModuleSourceRootType<P> type,
P properties) |
void |
clearExcludeFolders() |
void |
clearSourceFolders() |
VirtualFile [] |
getExcludeFolderFiles()
Returns the list of files and directories for valid excluded roots under this content root.
|
ExcludeFolder [] |
getExcludeFolders()
Returns the list of excluded roots configured under this content root.
|
java.util.List<java.lang.String> |
getExcludeFolderUrls() |
java.util.List<java.lang.String> |
getExcludePatterns()
Returns patterns for names of files which should be excluded from this content root.
|
VirtualFile |
getFile()
Returns the root file or directory for the content root, if it is valid.
|
ModuleRootModel |
getRootModel() |
VirtualFile [] |
getSourceFolderFiles()
Returns the list of files and directories for valid source roots under this content root.
|
SourceFolder [] |
getSourceFolders()
Returns the list of source roots under this content root.
|
java.util.List<SourceFolder> |
getSourceFolders(JpsModuleSourceRootType<?> rootType) |
java.util.List<SourceFolder> |
getSourceFolders(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes) |
java.lang.String |
getUrl()
Returns the URL of content root.
|
void |
removeExcludeFolder(ExcludeFolder excludeFolder)
Removes an exclude root from this content root.
|
boolean |
removeExcludeFolder(java.lang.String url)
Removes an exclude root from this content root.
|
void |
removeExcludePattern(java.lang.String pattern) |
void |
removeSourceFolder(SourceFolder sourceFolder)
Removes a source or test source root from this content root.
|
void |
setExcludePatterns(java.util.List<java.lang.String> patterns) |
isSynthetic
VirtualFile getFile()
java.lang.String getUrl()
VirtualFileManager.findFileByUrl(String)
SourceFolder [] getSourceFolders()
ContentEntry
SourceFolder
sjava.util.List<SourceFolder> getSourceFolders(JpsModuleSourceRootType<?> rootType)
rootType
- type of accepted source rootsjava.util.List<SourceFolder> getSourceFolders(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
rootTypes
- types of accepted source rootsVirtualFile [] getSourceFolderFiles()
ExcludeFolder [] getExcludeFolders()
ContentEntry
ExcludeFolder
sjava.util.List<java.lang.String> getExcludeFolderUrls()
VirtualFile [] getExcludeFolderFiles()
SourceFolder addSourceFolder(VirtualFile file, boolean isTestSource)
file
- the file or directory to add as a source root.isTestSource
- true if the file or directory is added as a test source root.SourceFolder addSourceFolder(VirtualFile file, boolean isTestSource, java.lang.String packagePrefix)
file
- the file or directory to add as a source root.isTestSource
- true if the file or directory is added as a test source root.packagePrefix
- the package prefix for the root to add, or an empty string if no
package prefix is required.<P extends JpsElement> SourceFolder addSourceFolder(VirtualFile file, JpsModuleSourceRootType<P> type, P properties)
<P extends JpsElement> SourceFolder addSourceFolder(VirtualFile file, JpsModuleSourceRootType<P> type)
SourceFolder addSourceFolder(java.lang.String url, boolean isTestSource)
url
- the file or directory url to add as a source root.isTestSource
- true if the file or directory is added as a test source root.<P extends JpsElement> SourceFolder addSourceFolder(java.lang.String url, JpsModuleSourceRootType<P> type)
<P extends JpsElement> SourceFolder addSourceFolder(java.lang.String url, JpsModuleSourceRootType<P> type, P properties)
void removeSourceFolder(SourceFolder sourceFolder)
sourceFolder
- the source root to remove (must belong to this content root).void clearSourceFolders()
ExcludeFolder addExcludeFolder(VirtualFile file)
file
- the file or directory to add as an exclude root.ExcludeFolder addExcludeFolder(java.lang.String url)
url
- the file or directory url to add as an exclude root.void removeExcludeFolder(ExcludeFolder excludeFolder)
excludeFolder
- the exclude root to remove (must belong to this content root).boolean removeExcludeFolder(java.lang.String url)
url
- url of the exclude roottrue
if the exclude root was removedvoid clearExcludeFolders()
java.util.List<java.lang.String> getExcludePatterns()
void addExcludePattern(java.lang.String pattern)
void removeExcludePattern(java.lang.String pattern)
void setExcludePatterns(java.util.List<java.lang.String> patterns)
ModuleRootModel getRootModel()