public class JpsContentEntry extends java.lang.Object implements ContentEntry, Disposable
Disposable.Parent| Constructor and Description |
|---|
JpsContentEntry(JpsModule module,
JpsRootModel rootModel,
java.lang.String rootUrl) |
| 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() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
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.
|
boolean |
isSynthetic() |
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) |
public JpsContentEntry(JpsModule module, JpsRootModel rootModel, java.lang.String rootUrl)
public VirtualFile getFile()
ContentEntrygetFile in interface ContentEntrypublic java.lang.String getUrl()
ContentEntryVirtualFileManager.findFileByUrl(String)getUrl in interface ContentEntrypublic SourceFolder [] getSourceFolders()
ContentEntrygetSourceFolders in interface ContentEntryContentEntry SourceFolderspublic java.util.List<SourceFolder> getSourceFolders(JpsModuleSourceRootType<?> rootType)
getSourceFolders in interface ContentEntryrootType - type of accepted source rootspublic java.util.List<SourceFolder> getSourceFolders(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
getSourceFolders in interface ContentEntryrootTypes - types of accepted source rootspublic VirtualFile [] getSourceFolderFiles()
ContentEntrygetSourceFolderFiles in interface ContentEntrypublic ExcludeFolder [] getExcludeFolders()
ContentEntrygetExcludeFolders in interface ContentEntryContentEntry ExcludeFolderspublic java.util.List<java.lang.String> getExcludeFolderUrls()
getExcludeFolderUrls in interface ContentEntrypublic VirtualFile [] getExcludeFolderFiles()
ContentEntrygetExcludeFolderFiles in interface ContentEntrypublic SourceFolder addSourceFolder(VirtualFile file, boolean isTestSource)
ContentEntryaddSourceFolder in interface ContentEntryfile - the file or directory to add as a source root.isTestSource - true if the file or directory is added as a test source root.public SourceFolder addSourceFolder(VirtualFile file, boolean isTestSource, java.lang.String packagePrefix)
ContentEntryaddSourceFolder in interface ContentEntryfile - 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.public <P extends JpsElement> SourceFolder addSourceFolder(VirtualFile file, JpsModuleSourceRootType<P> type, P properties)
addSourceFolder in interface ContentEntrypublic <P extends JpsElement> SourceFolder addSourceFolder(VirtualFile file, JpsModuleSourceRootType<P> type)
addSourceFolder in interface ContentEntrypublic SourceFolder addSourceFolder(java.lang.String url, boolean isTestSource)
ContentEntryaddSourceFolder in interface ContentEntryurl - 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.public <P extends JpsElement> SourceFolder addSourceFolder(java.lang.String url, JpsModuleSourceRootType<P> type)
addSourceFolder in interface ContentEntrypublic <P extends JpsElement> SourceFolder addSourceFolder(java.lang.String url, JpsModuleSourceRootType<P> type, P properties)
addSourceFolder in interface ContentEntrypublic void removeSourceFolder(SourceFolder sourceFolder)
ContentEntryremoveSourceFolder in interface ContentEntrysourceFolder - the source root to remove (must belong to this content root).public void clearSourceFolders()
clearSourceFolders in interface ContentEntrypublic ExcludeFolder addExcludeFolder(VirtualFile file)
ContentEntryaddExcludeFolder in interface ContentEntryfile - the file or directory to add as an exclude root.public ExcludeFolder addExcludeFolder(java.lang.String url)
ContentEntryaddExcludeFolder in interface ContentEntryurl - the file or directory url to add as an exclude root.public void removeExcludeFolder(ExcludeFolder excludeFolder)
ContentEntryremoveExcludeFolder in interface ContentEntryexcludeFolder - the exclude root to remove (must belong to this content root).public boolean removeExcludeFolder(java.lang.String url)
ContentEntryremoveExcludeFolder in interface ContentEntryurl - url of the exclude roottrue if the exclude root was removedpublic void clearExcludeFolders()
clearExcludeFolders in interface ContentEntrypublic java.util.List<java.lang.String> getExcludePatterns()
ContentEntrygetExcludePatterns in interface ContentEntrypublic void addExcludePattern(java.lang.String pattern)
addExcludePattern in interface ContentEntrypublic void removeExcludePattern(java.lang.String pattern)
removeExcludePattern in interface ContentEntrypublic void setExcludePatterns(java.util.List<java.lang.String> patterns)
setExcludePatterns in interface ContentEntrypublic ModuleRootModel getRootModel()
getRootModel in interface ContentEntrypublic boolean isSynthetic()
isSynthetic in interface Syntheticpublic void dispose()
Disposabledispose in interface Disposable