public abstract class ProjectRootManager extends SimpleModificationTracker
EVER_CHANGED, NEVER_CHANGED
Constructor and Description |
---|
ProjectRootManager() |
Modifier and Type | Method and Description |
---|---|
abstract VirtualFile [] |
getContentRoots()
Returns the list of content roots for all modules in the project.
|
abstract VirtualFile [] |
getContentRootsFromAllModules()
Unlike getContentRoots(), this includes the project base dir.
|
abstract java.util.List<java.lang.String> |
getContentRootUrls()
Returns the list of content root URLs for all modules in the project.
|
abstract VirtualFile [] |
getContentSourceRoots()
Returns the list of source roots under the content roots for all modules in the project.
|
abstract ProjectFileIndex |
getFileIndex()
Returns the file index for the project.
|
static ProjectRootManager |
getInstance(Project project)
Returns the project root manager instance for the specified project.
|
abstract java.util.List<VirtualFile> |
getModuleSourceRoots(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
Returns the list of source roots from all modules which types belong to the specified set
|
abstract Sdk |
getProjectSdk() |
abstract java.lang.String |
getProjectSdkName() |
abstract java.lang.String |
getProjectSdkTypeName() |
abstract OrderEnumerator |
orderEntries()
Creates new enumerator instance to process dependencies of all modules in the project.
|
abstract OrderEnumerator |
orderEntries(java.util.Collection<? extends Module> modules)
Creates new enumerator instance to process dependencies of several modules in the project.
|
abstract void |
setProjectSdk(Sdk sdk)
Sets the SDK to be used for the project.
|
abstract void |
setProjectSdkName(java.lang.String name)
Deprecated.
|
abstract void |
setProjectSdkName(java.lang.String name,
java.lang.String sdkTypeName)
Sets the name of the JDK to be used for the project
|
getModificationCount, incModificationCount
public static ProjectRootManager getInstance(Project project)
project
- the project for which the instance is requested.public abstract ProjectFileIndex getFileIndex()
public abstract OrderEnumerator orderEntries()
OrderEnumerator.recursively()
option is ignored and OrderEnumerator.withoutDepModules()
option is forcedpublic abstract OrderEnumerator orderEntries(java.util.Collection<? extends Module> modules)
modules
- modules to processpublic abstract VirtualFile [] getContentRootsFromAllModules()
public abstract java.util.List<java.lang.String> getContentRootUrls()
public abstract VirtualFile [] getContentRoots()
public abstract VirtualFile [] getContentSourceRoots()
public abstract java.util.List<VirtualFile> getModuleSourceRoots(java.util.Set<? extends JpsModuleSourceRootType<?>> rootTypes)
rootTypes
- types of source rootspublic abstract Sdk getProjectSdk()
public abstract java.lang.String getProjectSdkName()
public abstract java.lang.String getProjectSdkTypeName()
SdkTypeId.getName()
of the current Project SDKpublic abstract void setProjectSdk(Sdk sdk)
sdk
- the SDK instance.@Deprecated public abstract void setProjectSdkName(java.lang.String name)
setProjectSdk(Sdk)
or setProjectSdkName(String, String)
public abstract void setProjectSdkName(java.lang.String name, java.lang.String sdkTypeName)
sdkTypeName
- the SdkTypeId.getName()
of the SDK type