This document includes information for you to start developing with the EMF project source files. The EMF open source project is stored in a CVS repository. You should be familiar with CVS concepts and have some experience working with the Eclipse Workbench. A good source of information on CVS can be found on the CVS repository page. The Eclipse help files also provide a tutorial and documentation on how to use CVS.
This document includes a setup procedure that you may wish to use to checkout the EMF projects and resolve compilation errors. We have used this procedure on Eclipse 2.1.0 with a clean workspace.
In order to develop on the EMF project, you need the following software installed on your system.
When specifying directory paths on your system, remember to compensate for the difference between the environment presented in this article and your development environment.
Each EMF plug-in depends on other plug-ins. Since Eclipse 2.1, the PDE provides an alternative way of expressing and computing the classpath using classpath containers. In order to turn on the use of classpath containers, do the following:
You need to specify where Eclipse should look for required plug-ins if they do not exist in the current workspace. To do this:
If you are unfamiliar with CVS concepts, there is a good list of resources on the CVS repository page.
For each published EMF driver, a new CVS branch is created. The name of the CVS branch follows this convention:
EMF_<version number>_<driver level>
where
<version number> is based on the current EMF version (for example, 1_1_0), and
<driver level> is the driver level that was used to drop to the CVS repository.
For example, a branch might have the following name:
EMF_1_1_0_20030501_0612VL
The HEAD branch will always contain the latest file versions. Therefore, in order to get the latest files, you would just have to work with the HEAD branch. The structure of the CVS repository is shown below:
As multiple drivers are placed in CVS, the repository will have a HEAD branch corresponding to the latest driver, and entries under Branches that correspond to earlier EMF build levels. If for some reason you need to get files from a certain driver, you would check out code from the branch you are interested in.
An anonymous user will have access only to check out files from the CVS repository. This user does not have the privileges to check in files into CVS.
To check out EMF files from CVS:
If you followed the previous section, you should see a new repository entry in the CVS Repositories view. To check out code, do the following:
Following this scenario, you will find that the projects have compilation errors after you check them out. To resolve these, update the classpath. To do this, right click on the project and select the Update Classpath... menu option as shown below. The Update Java class path dialog will appear.
Ensure that your project is checked in the Plug-ins and Fragments Found list, and then click Finish. Note: If you want to update all the EMF projects, select all the EMF projects in the dialog before you click Finish.
To synchronize your local changes with the HEAD CVS branch, right click on the resource that you want to synchronize, and then select Team > Synchronize with Repository.
The synchronize view should be open at this point. The following text is from the Eclipse help contents and briefly discusses the synchronization view. Please refer to the Eclipse help for the complete context and additional information.
At this point you can manually merge your changes or automatically merge the changes. To automatically merge your changes, right click on the resource you want to merge. Select Team > Update as shown below.
If there are conflicts that CVS cannot resolve, it will insert special markup in the file to indicate that those lines could not be merged. If you want more information about CVS, refer to the Eclipse help files.