public final class DummyProject extends UserDataHolderBase implements Project
Disposable.Parent
DIRECTORY_STORE_FOLDER
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
VirtualFile |
getBaseDir()
Returns a project base directory - a parent directory of a
.ipr file or .idea directory.Returns null for default project. |
@SystemIndependent java.lang.String |
getBasePath()
Returns a path to a project base directory (see Project.getBaseDir()).
Returns null for default project. |
<T> T |
getComponent(java.lang.Class<T> interfaceClass)
Gets the component by its interface class.
|
Condition<?> |
getDisposed() |
ExtensionsArea |
getExtensionArea() |
static Project |
getInstance() |
java.lang.String |
getLocationHash() |
MessageBus |
getMessageBus() |
java.lang.String |
getName()
Returns a name ot the project.
|
DefaultPicoContainer |
getPicoContainer() |
VirtualFile |
getProjectFile()
Returns project descriptor file:
path/to/project/project.ipr - for file-based projects
path/to/project/.idea/misc.xml - for directory-based projects
Returns null for default project. |
@SystemIndependent java.lang.String |
getProjectFilePath() |
<T> T |
getService(java.lang.Class<T> serviceClass) |
VirtualFile |
getWorkspaceFile()
Returns a workspace file:
path/to/project/project.iws - for file-based projects
path/to/project/.idea/workspace.xml - for directory-based ones
Returns null for default project. |
boolean |
isDefault() |
boolean |
isDisposed() |
boolean |
isInitialized() |
boolean |
isOpen() |
void |
save() |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPresentableUrl
createError, createError, getComponent, getComponent, getComponentInstancesOfType, getComponentInstancesOfType, getComponents, getExtensions, getService, getServiceIfCreated, hasComponent, instantiateClass, instantiateClassWithConstructorInjection, instantiateExtensionWithPicoContainerOnlyIfNeeded, isDisposedOrDisposeInProgress, logError
getUserData, putUserData
public static Project getInstance()
public VirtualFile getProjectFile()
Project
path/to/project/project.ipr
- for file-based projectspath/to/project/.idea/misc.xml
- for directory-based projectsnull
for default project.getProjectFile
in interface Project
public java.lang.String getName()
Project
public java.lang.String getLocationHash()
getLocationHash
in interface Project
public @SystemIndependent java.lang.String getProjectFilePath()
getProjectFilePath
in interface Project
null
for default project.public VirtualFile getWorkspaceFile()
Project
Returns a workspace file:
path/to/project/project.iws
- for file-based projectspath/to/project/.idea/workspace.xml
- for directory-based onesnull
for default project.getWorkspaceFile
in interface Project
public VirtualFile getBaseDir()
Project
.ipr
file or .idea
directory.null
for default project.getBaseDir
in interface Project
com.intellij.openapi.project.ProjectUtil#guessProjectDir
,
Project.getBasePath()
public @SystemIndependent java.lang.String getBasePath()
Project
null
for default project.getBasePath
in interface Project
com.intellij.openapi.project.ProjectUtil#guessProjectDir
public <T> T getService(java.lang.Class<T> serviceClass)
getService
in interface ComponentManager
public <T> T getComponent(java.lang.Class<T> interfaceClass)
ComponentManager
getComponent
in interface ComponentManager
interfaceClass
- the interface class of the componentpublic DefaultPicoContainer getPicoContainer()
getPicoContainer
in interface ComponentManager
public ExtensionsArea getExtensionArea()
getExtensionArea
in interface ComponentManager
getExtensionArea
in interface AreaInstance
public boolean isDisposed()
isDisposed
in interface ComponentManager
ProjectImpl.dispose()
was called but not completed yet)
public Condition<?> getDisposed()
getDisposed
in interface ComponentManager
Application.invokeLater(Runnable, Condition)
for the usage example.public boolean isInitialized()
isInitialized
in interface Project
public MessageBus getMessageBus()
getMessageBus
in interface ComponentManager
com.intellij.application.Topics#subscribe
public void dispose()
Disposable
dispose
in interface Disposable