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:

To access a CVS repository and to check out the MTJ source code

As a prerequisite, you need to have a valid user ID for checking out 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.

  1. In Eclipse, to access the CVS repository, select Window -> Open Perspective -> Other.
    The Open Perspective window opens.
  2. In the Open perspective window, select CVS Repository Exploring and click OK.
    The CVS Repositories view opens in your workbench.
  3. In the CVS Repositories view, select Add CVS Repository.
    The Add CVS Repository window opens.
  4. In the Add CVS Repository window, in the Location field:
  5. In the Authentication field:
  6. In the Connection field:
  7. Check the box next to Validate connection on finish.
  8. Click Finish.
    The available folders are displayed in the CVS Repositories view. The MTJ sub-folder is org.eclipse.mtj.
  9. 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
  1. In the menu bar, select File -> Import.
    The Import window opens.
  2. Expand CVS and select Projects from CVS and click Next.
    The existing CVS CVS repository locations are displayed.
  3. Confirm that the Use existing repository location button is checked, highlight the desired CVS location from the list and click Next.
  4. 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.
  5. 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.
  1. 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.
  2. To confirm that this new platform runs, select, in the Java perspective, Run -> Run.
    The Run window opens.
  3. 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.
  4. In the Location field, enter the location of the desired workspace.
  5. 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.
  6. In the Java Runtime Environment field, confirm that you have the correct runtime JRE selected in the Runtime JRE field.
  7. 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.