|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprojectviewer.ProjectManager
This class takes care of the global project configuration, that is, the list of configured projects. This provides functionality to load the project list in the project viewer and to map project names to configuration file names.
Method Summary | |
void |
addProject(VPTProject p,
VPTGroup parent)
Adds a project to the list. |
void |
addProjectListeners(org.gjt.sp.jedit.PluginJAR jar)
Adds the plugin's declared project listeners to the list of project listeners to be added to a project when it's activated. |
void |
fireDynamicMenuChange()
|
java.util.List |
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.Iterator |
getProjects()
Returns an iterator that points to the (ordered) 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 |
removeProjectListeners(org.gjt.sp.jedit.PluginJAR jar)
Removes the project listeners of the given plugin from the list, and from any active project in ProjectViewer. |
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 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. |
protected void |
unloadProjectProperties()
Called when a plugin is unloaded so that object properties are serialized, avoiding ClassCastExceptions later. |
static void |
writeXMLHeader(java.lang.String encoding,
java.io.Writer out)
Writes an XML header to the given writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
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.Iterator 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 java.util.List getGlobalFilterList()
public void setGlobalFilterList(java.util.List globalFilterList)
public void addProjectListeners(org.gjt.sp.jedit.PluginJAR jar)
public void removeProjectListeners(org.gjt.sp.jedit.PluginJAR jar)
protected void unloadProjectProperties()
public void fireDynamicMenuChange()
public void saveProjectList()
protected void unload()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |