Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide.project
Interface IdeProjectManager

public interface IdeProjectManager

Manages `IdeProject`s and assigns/removes project listeners.

The `getProject` method finds `IdeProject` by the specified project file name of the project. It doesn't open the project, but having `IdeProject` found, allows to extract some kind of information about that project. The project can be opened (that is loaded into IDE) via its open method.

There can be any number of `IdeProject`s (got through `getProject` method) Together is working with, but the opened project is called the active project and can be returned by `getActiveProject` method.

The `addProjectListener` and `removeProjectListener` methods work with the project listeners. Each listener receives project events (close, open etc.) on all found projects.

Current `IdeProjectManager` can be obtained via `IdeProjectManagerAccess.getProjectManager` method.

Author:
  TogetherSoft
See Also: IdeProjectManagerAccess.getProjectManager(), IdeProject, getProject(java.lang.String), getActiveProject()

Method Summary
`void` | `addProjectListener(IdeProjectListener listener)` Adds the specified project listener.
`IdeProject` | `getActiveProject()` Returns the active project.
`IdeProject` | `getProject(String projectFile)` Given the name of a project, returns the `IdeProject`.
`void` | `removeProjectListener(IdeProjectListener listener)` Removes the specified listener.

Method Detail

### addProjectListener

    public void addProjectListener(IdeProjectListener listener)

  Adds the specified project listener.
  Parameters:
    listener - `IdeProjectListener` object to be added

### getActiveProject

    public IdeProject getActiveProject()

  Returns the active project. If there is no opened project returns `null`. For example: `

        if (IdeProjectManagerAccess.getProjectManager().getActiveProject()==null){
             IdeMessageManagerAccess.printMessage(IdeMessageType.ERROR_MODAL,"No open project");
             return;
         }

  `
  Returns: the `IdeProject` object that represents the currently opened project

### getProject

    public IdeProject getProject(String projectFile)

  Given the name of a project, returns the `IdeProject`. If such project not found, returns `null`. For additional information see the description of this interface above.
  Parameters:
    projectFile - `String` with the name of this project file. For example, `"C:/Together3/myprojects/myProj/myProj.tpr"`.
  Returns: the `IdeProject`

### removeProjectListener

    public void removeProjectListener(IdeProjectListener listener)

  Removes the specified listener.
  Parameters:
    listener - the `IdeProjectListener` object to be deleted

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD