Skip to content

Adding a module

Chris Casola edited this page Feb 3, 2013 · 1 revision

[note: this may be easier in the future if we set up scripts to automate this stuff]

Each module is represented in the repository as a separate Eclipse project. The modules have separate entry points for Janeway and the core. To add a module, follow these steps:

Create an Eclipse project for your module

Follow the steps for Creating a New Module Project.

Provide the required classes for the Janeway client

A module must provide a class that implements the IJanewayModule interface. This interface is located in the Janeway project and it requires two methods, getName() and getTabs(). Basically, it ensures your module class can provide it's name and a list of tabs that it will use.

The tabs are of type JanewayTabModel. A JanewayTabModel provides the name of the tab, an icon, a JComponent (probably a JPanel) that represents the main body of the tab, and a JComponent that holds the toolbar contents for that tab.

For an example module, you can look either at the DummyModule.java file (located in edu.wpi.cs.wpisuitetng.janeway) or for a more complex example, the DefectTracker module. The DummyModule.java is an entire module contained in one file, so it is a simple place to start. You can also follow the Step by Step Guide to Creating a Module.