Checking out MTJ code from CVS
This section provides information on how to set up your Eclipse environment
to develop or modify the MTJ plug-ins. This includes instruction on:
- How to connect to CVS and how to check out the MTJ
source code
- How to set up a target platform
To access a CVS repository and to check
out the MTJ source code
Note: This step list applies
to a normal networking environment. If you use extra firewalls or similar
networking services, they might prevent you the access to the Eclipse
site. In such case, refer to http://wiki.eclipse.org/index.php/CVS_Howto
and contact you network support.
- In Eclipse, to access the CVS repository, select
Window -> Open Perspective -> Other.
The Open Perspective window opens.
- In the Open perspective window, select CVS
Repository Exploring and click OK.
The CVS Repositories view opens in your workbench.
- In the CVS Repositories view, select Add
CVS Repository.
The Add CVS Repository window opens.

- In the Add CVS Repository window, in the Location
field:
- In the Host field, enter dev.eclipse.org
- In the Repository path field, enter /cvsroot/dsdp
- In the Authentication
field:
- In the User
field, enter anonymous.
- In the Password
field, leave the field empty.
- In the Connection
field:
- In the Connection
type drop-down menu, select pserver.
- Confirm that the Use
default port radio-button is checked.
- Check the box next to Validate
connection on finish.
- Click Finish.
The available folders are displayed in the CVS Repositories view. The
MTJ sub-folder is org.eclipse.mtj.

- Right-click the org.eclipse.mtj
subfolder, highlight the desired folder and select Check
Out.
The selected folder and its contents are imported into your Eclipse
workbench. You can view them in the Package Explorer view.
Note: After you have established
the CVS repository, you can import material as projects from the CVS.
The available repositories are shown in the checkout wizard.
To import projects from CVS using existing
repositories
- In the menu bar, select File
-> Import.
The Import window opens.
- Expand CVS
and select Projects from CVS and
click Next.
The existing CVS CVS repository locations are displayed.

- Confirm that the Use
existing repository location button is checked, highlight the desired
CVS location from the list and click Next.
- To list the available modules, check the Use
an existing module (this will allow you to browse the modules in the repository)
button.
The available modules are listed.
- Expand the desired modules, highlight the desired
files and click Finish.
The chosen material is imported into your workspace.
To set up a target platform
Having
a target platform allows you to compile and run your modified code without
having to bring all of the source code into your development workbench.
The target platform should be the same as the you are developing for.
The specified target platform contains the eclipse plug-ins which your
code will be compiled against.
- Download and install the desired Eclipse and MTJ
versions in a separate folder from your current development Eclipse platform.
For MTJ, use Eclipse 3.2 and EMF 2.2.x. This will be your target platform.
- To confirm that this new platform runs, select, in
the Java perspective, Run -> Run.
The Run window opens.
- In the left-side pane, right-click Eclipse
application and from the context-sensitive pop-up menu, select
New.
In the right-side pane, the new configuration details are displayed.
- In the Location field, enter the location of the
desired workspace.
- In the Program to
Run filed, confirm that the Run
a product button is selected, with the org.eclipse.sdk.ide
chosen from the drop-down menu.
- In the Java Runtime
Environment field, confirm that you have the correct runtime JRE
selected in the Runtime JRE field.
- Click Run.
The chosen new configuration of Eclipse compiles the source code in
your workspace and runs from your chosen target platform. This second
instance of Eclipse that opens, displays any modifications you have made
to the source code. This second instance of Eclipse now serves as a testing
environment for your new code. Note that to test the code, you have to
repeat the steps 2 - 7 every time you make changes to the code.
MTJ architecture
MTJ development examples