public final class ProjectManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addProject(VPTProject p,
VPTGroup parent)
Adds a project to the list.
|
void |
fireDynamicMenuChange() |
java.util.List<VPTFilterData> |
getGlobalFilterList()
Returns the global filter list
This list is valid if there is not a project specific list
|
static ProjectManager |
getInstance()
Returns the project manager instance.
|
VPTProject |
getProject(java.lang.String name)
Returns the project with the given name.
|
java.util.List<VPTProject> |
getProjects()
Returns a list containing the list of project names
managed by this manager.
|
boolean |
hasProject(java.lang.String name)
Returns whether a project with the given name exists.
|
boolean |
isLoaded(java.lang.String pName)
Returns whether a project is loaded or not.
|
void |
removeProject(VPTProject p)
Removes the project from the internal list of projects.
|
void |
renameProject(java.lang.String oldName,
java.lang.String newName)
Updates information about a project to reflect its name change.
|
void |
save()
Saves all the project data to the disk (config + each project).
|
void |
saveProject(VPTProject p)
Save the project's data to the config file.
|
void |
saveProject(VPTProject p,
boolean wait)
Same as above, with an extra argument.
|
void |
saveProjectList()
Saves the "global" data for the projects: the list of projects and
the file names where each project data is stored.
|
void |
setGlobalFilterList(java.util.List<VPTFilterData> globalFilterList)
sets the global filter list as entered in option pane
This list is valid if there is not a project specific list
Clear cache in FilteredModel when globalFilterList changed
|
protected void |
unload() |
void |
unloadProject(VPTProject p)
Unloads a project: saves it to disk, removes all nodes and changes its
state to "unloaded", freeing memory.
|
void |
updateVCSStatus(VPTProject project) |
static void |
writeXMLHeader(java.lang.String encoding,
java.io.Writer out)
Writes an XML header to the given writer.
|
public static ProjectManager getInstance()
public static void writeXMLHeader(java.lang.String encoding, java.io.Writer out) throws java.io.IOException
java.io.IOException
public void save() throws java.io.IOException
java.io.IOException
public void saveProject(VPTProject p)
addProject(VPTProject, VPTGroup)
before calling this method).public void saveProject(VPTProject p, boolean wait)
wait
- Whether to wait for the I/O operation to finish.saveProject(VPTProject)
public void removeProject(VPTProject p)
public void renameProject(java.lang.String oldName, java.lang.String newName)
public void addProject(VPTProject p, VPTGroup parent)
public VPTProject getProject(java.lang.String name)
public java.util.List<VPTProject> getProjects()
public boolean isLoaded(java.lang.String pName)
pName
- The project's name.java.lang.NullPointerException
- If the project does not exist.public boolean hasProject(java.lang.String name)
public void unloadProject(VPTProject p)
public void updateVCSStatus(VPTProject project)
public java.util.List<VPTFilterData> getGlobalFilterList()
public void setGlobalFilterList(java.util.List<VPTFilterData> globalFilterList)
public void fireDynamicMenuChange()
public void saveProjectList()
protected void unload()