Creating a Metropolis Project

In order to create a graphical view of a Metropolis model, the model must be in a Metropolis project under Eclipse.

Create a project from the File menu:
File -> New -> Project... -> Other -> Metropolis Project

You are first prompted to give the project a name. The name must be the name of the root package of your model. The top-level folder of the project is where you will put any metamodel (.mmm) source files belonging to the top-level package, and any subfolders containing sub-packages.

After entering the name, you can hit Finish.

Source Code

Your Metropolis metamodel (.mmm) source code can be created in place using Eclipse's text editor, or it can be imported into your project.

To import files that are accessable from your file system, select the project title in the Package Explorer view, right-click to bring up the context menu, and select the "Import..." menu item. On the first page of the resulting wizard, select "File system" as the source and navigate to your files in the subsequent wizard pages.

If your files are in CVS, you can instead use the "Team -> Share Project..." context menu item to check out your files from CVS. The details of using CVS with Eclipse are outside the scope of this document, but are fairly straight-forward.

Properties

The specifications for compiling your model (i.e., the information you would include on the command line of a metacomp command that would build it) are entered as properties of the Eclipse project containing your model. To enter that information, right-click on the project resource in the Package Explorer view:

Image of context menu showing Properties.
Select Properties in project context menu:
The Properties dialog for a Metropolis project will contain two pages, called "Metro Specs" and "Metro Source Files". Here are illustrations of example settings for the producers_consumer example:
Metro Specs properties page.
The Metro Specs page, for entering Java classpath and Metropolis classpath (each initially set to default values), and the fully-qualified name of the top-level model package, and the name of the top-level netlist.

Metro Source Files properties page.
The Metro Source Files page, with tools for browsing to files in the project, in the Metropolis library, and elsewhere in the local file system, respectively. Use the Add... button to add entries. Select entries and click the Delete button to delete them.

To further illustrate, here are settings for the Picture-in-Picture example:
Metro Specs properties page.
The Metro Specs page for the PiP example.

Metro Source Files properties page.
The Metro Source Files page for the PiP example.