public abstract class ProjectManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Topic<ProjectManagerListener> |
TOPIC |
Constructor and Description |
---|
ProjectManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addProjectManagerListener(ProjectManagerListener listener)
Deprecated.
Use
TOPIC instead |
abstract void |
addProjectManagerListener(ProjectManagerListener listener,
Disposable parentDisposable)
Deprecated.
Use
TOPIC instead |
abstract void |
addProjectManagerListener(Project project,
ProjectManagerListener listener)
Adds listener to the specified project.
|
abstract void |
addProjectManagerListener(VetoableProjectManagerListener listener) |
abstract boolean |
closeProject(Project project)
Closes the specified project, but does not dispose it.
|
abstract Project |
createProject(java.lang.String name,
java.lang.String path)
Create new project in given location.
|
abstract Project |
getDefaultProject()
Returns the project which is used as a template for new projects.
|
static ProjectManager |
getInstance() |
static ProjectManager |
getInstanceIfCreated() |
abstract Project [] |
getOpenProjects()
Returns the list of currently opened projects.
|
Project |
loadAndOpenProject(java.io.File file) |
abstract Project |
loadAndOpenProject(java.nio.file.Path file) |
abstract Project |
loadAndOpenProject(java.lang.String filePath)
Loads and opens a project with the specified path.
|
abstract void |
reloadProject(Project project)
Asynchronously reloads the specified project.
|
abstract void |
removeProjectManagerListener(ProjectManagerListener listener)
Deprecated.
Use
TOPIC instead |
abstract void |
removeProjectManagerListener(Project project,
ProjectManagerListener listener)
Removes listener from the specified project.
|
abstract void |
removeProjectManagerListener(VetoableProjectManagerListener listener) |
public static final Topic<ProjectManagerListener> TOPIC
public static ProjectManager getInstance()
ProjectManager
instancepublic static ProjectManager getInstanceIfCreated()
@Deprecated public abstract void addProjectManagerListener(ProjectManagerListener listener)
TOPIC
insteadpublic abstract void addProjectManagerListener(VetoableProjectManagerListener listener)
@Deprecated public abstract void addProjectManagerListener(ProjectManagerListener listener, Disposable parentDisposable)
TOPIC
instead@Deprecated public abstract void removeProjectManagerListener(ProjectManagerListener listener)
TOPIC
insteadpublic abstract void removeProjectManagerListener(VetoableProjectManagerListener listener)
public abstract void addProjectManagerListener(Project project, ProjectManagerListener listener)
project
- project to add listener tolistener
- listener to addpublic abstract void removeProjectManagerListener(Project project, ProjectManagerListener listener)
project
- project to remove listener fromlistener
- listener to removepublic abstract Project [] getOpenProjects()
ComponentManager.isDisposed()
must be checked for each project before use (if the whole operation is not under read action).public abstract Project getDefaultProject()
Project
instance is not
supposed to be used for anything except template settings storage.
NB: default project can be lazy loadedpublic abstract Project loadAndOpenProject(java.lang.String filePath) throws java.io.IOException, JDOMException
filePath
- the .ipr file pathjava.io.IOException
- if the project file was not found or failed to readJDOMException
- if the project file contained invalid XMLpublic Project loadAndOpenProject(java.io.File file) throws java.io.IOException, JDOMException
java.io.IOException
JDOMException
public abstract Project loadAndOpenProject(java.nio.file.Path file) throws java.io.IOException, JDOMException
java.io.IOException
JDOMException
public abstract boolean closeProject(Project project)
project
- the project to close.public abstract void reloadProject(Project project)
project
- the project to reload.public abstract Project createProject(java.lang.String name, java.lang.String path)
name
- project namepath
- project location