org.openoffice.ide.eclipse.core.model
Class ProjectsManager

java.lang.Object
  extended by org.openoffice.ide.eclipse.core.model.ProjectsManager

public class ProjectsManager
extends java.lang.Object

Singleton mapping the UNO-IDL projects to their name to provide an easy access to UNO-IDL projects.

Author:
cedricbosdo

Constructor Summary
ProjectsManager()
           
 
Method Summary
static void addProject(org.eclipse.core.resources.IProject pProject)
          Add a project that isn't already loaded.
static void addProject(IUnoidlProject pProject)
          Adds a project to the manager only if there is no other project with the same name.
static void dispose()
          This method will release all the stored project references.
static IUnoidlProject getProject(java.lang.String pName)
          Returns the unoidl project with the given name, if it exists.
static IUnoidlProject[] getProjects()
           
static void load()
          Private constructor for the singleton.
static void removeProject(java.lang.String pName)
          Removes a project from the manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectsManager

public ProjectsManager()
Method Detail

dispose

public static void dispose()
This method will release all the stored project references. There is no need to call this method in any other place than the plugin stop method.


getProject

public static IUnoidlProject getProject(java.lang.String pName)
Returns the unoidl project with the given name, if it exists. Otherwise null is returned

Parameters:
pName - the name of the project to find
Returns:
the found project.

addProject

public static void addProject(org.eclipse.core.resources.IProject pProject)
Add a project that isn't already loaded.

Parameters:
pProject - the project to load and add

addProject

public static void addProject(IUnoidlProject pProject)
Adds a project to the manager only if there is no other project with the same name.

Parameters:
pProject - the project to add

removeProject

public static void removeProject(java.lang.String pName)
Removes a project from the manager.

Parameters:
pName - the name of the project to remove

getProjects

public static IUnoidlProject[] getProjects()
Returns:
an array containing all the defined UNO projects

load

public static void load()
Private constructor for the singleton. Its charge is to load all the existing UNO-IDL projects