Project Manager Plugin

A project consists of a large number of documents such as web pages, manual chapters, and source code files. Documents can be organized into packages. For example, related source code files might be grouped in a package. Chapters might be grouped into a package representing a book, and so forth.

Also, documents can depend on other documents. For example, a source code file might use classes defined in another source code file. A manual chapter might refer to other chapters. A web page might contain links to another web page. When a document is updated, we may need to update the documents that depend on it.

A project manager is a tool for keeping track of documents, packages, and dependencies.

Requirements Model

In addition to the use cases inherited from the MVCWorkbench (save, load, quit, etc.):

Add package

Add a package to a project.

Priority: High

Main scenario

User: Selects manage/add/package menu item.
PMP: Displays a dialog box prompting user for the name of the package and, optionally, the super package the package belongs to.

PMP: Adds a package object to the project, then updates all views.

Add document

Add a document to a project.

Priority: High

Main scenario

User: Selects manage/add/document menu item.
PMP: Displays a dialog box prompting user for the name of the document and the package the document belongs to.

PMP: Adds a document object to the project, then updates all views.

Add dependency

Add a dependency to a project.

Priority: High

Main scenario

User: Selects manage/add/dependency menu item.
PMP: Displays a dialog box prompting user for the name of the client and provider documents. (The client depends on the provider).

PMP: Adds a dependency object to the project, then updates all views.

Remove package

Removes a package from a project.

Priority: Medium

Main scenario

User: Selects manage/remove/package menu item.
PMP: Displays a dialog box prompting user for the name of the package to be removed.

PMP: Removes the selected package if the package is empty, otherwise an error dialog is displayed.

Removing files and dependencies are similar.

Domain Model

A project is a collection of items. Packages and documents are items. A package contains a number of items. Note that this is an example of the Composite Design Pattern.

Design Model

PMP instantiates the Model-View-Controller design pattern. Users can ask for two types of views of a project: a hierarchy view and a dependency view. A hierarchy view shows the package structure of the project. The dependency view shows a network (graph) in which nodes are documents and links represent dependencies.

Implementation

Consult:

http://www.cs.sjsu.edu/faculty/pearce/jutil/graph/

for the Graph class.

Consult:

http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html

for a tutorial on JTree.