Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EMF/Getting Source"

< EMF
(New page: This document describes how to access the source code for the EMF, SDO and XSD components. It assumes some familiarity with CVS concepts and some experience working with the Eclipse workbe...)
 
m (page replaced by updated and expanded version)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
This document describes how to access the source code for the EMF, SDO and XSD components. It assumes some familiarity with CVS concepts and some experience working with the Eclipse workbench.  For more information on CVS, please consult eclipse.org's [http://dev.eclipse.org/viewcvs/index.cgi CVS repository] page. Eclipse's help system also provides a tutorial and documentation for CVS.
+
#REDIRECT [[EMF/Setting_up_a_development_environment]]
 
+
<b>This document includes a setup procedure that you may wish to use to checkout the EMF, SDO and XSD projects and resolve compilation errors.  We have used this procedure on Eclipse 3.3.1.</b>
+
 
+
 
+
==Software Environment==
+
 
+
In order to develop on the EMF, SDO and XSD projects, you need [[EMF/FAQ#What_version_of_Eclipse_do_I_need_for_EMF.2C_SDO_and_XSD.3F_Which_EMF_version_will_run_on_my_Eclipse_version.3F | Eclipse]] and [[EMF/FAQ#What_minimum_version_of_Java_do_I_need.3F | an appropriate JRE]].
+
 
+
When specifying directory paths on your system, remember to compensate for any difference between the environment presented in this article and your development environment.
+
 
+
 
+
==Setting up the Eclipse Workspace==
+
 
+
===Configuring the plug-in environment===
+
 
+
 
+
You need to specify where Eclipse should look for required plug-ins if they do not exist in the current workspace. To do this:
+
 
+
* In the Preferences dialog (<b>Window > Preferences</b>), with <b>Plug-In Development</b> expanded, select <b>Target Platform</b>.
+
* Click <b>Select All</b> so that all the plug-ins are selected.
+
* Click <b>OK</b> to close the Preferences dialog.
+
 
+
[[Image:EMF_getting_sources_img1.jpg]]
+
 
+
===Configuring the the Eclipse CVS preferences===
+
 
+
It is highly recommended to prune empty directories when extracting the code from the CVS repository.  This is how you
+
can set Eclipse to do that:
+
 
+
* Select <b>Windows > Preferences > Team</b>.
+
* Open <b>CVS</b> and select the <b>Files and Folders</b> tab, then select <b>Prune empty directories</b>.
+
* Click <b>OK</b> to close the Preferences dialog.
+
 
+
[[Image:EMF_getting_sources_img2.jpg]]
+
 
+
 
+
==Understanding the CVS Structure==
+
 
+
If you are unfamiliar with CVS concepts, there is a good list of resources on the [http://dev.eclipse.org/viewcvs/index.cgi/?cvsroot=Modeling_Project CVS repository] page.
+
 
+
===Modules structure===
+
 
+
The EMF, SDO and XSD sources are divided into three modules in CVS.
+
 
+
<table cellspacing="0" cellpadding="5" border="1">
+
<tr>
+
<td><b>CVS Repository</b></td>
+
<td><b>Module</b></td>
+
<td colspan="2"><b>Directories</b></td>
+
</tr>
+
<tr>
+
<td rowspan="6" valign="top">/cvsroot/modeling</td>
+
<td rowspan="6" valign="top">org.eclipse.emf/org.eclipse.emf</td>
+
</tr>
+
<tr>
+
<td>plugins</td>
+
<td>contains the EMF runtime plug-ins</td>
+
</tr>
+
<tr>
+
<td>features</td>
+
<td>contains the EMF runtime features</td>
+
</tr>
+
<tr>
+
<td>doc</td>
+
<td>contains the EMF documentation plug-ins and features</td>
+
</tr>
+
<tr>
+
<td>tests</td>
+
<td>contains the EMF, SDO and XSD automated tests plug-ins and features</td>
+
</tr>
+
<tr>
+
<td>examples</td>
+
<td>contains the EMF examples</td>
+
</tr>
+
<tr>
+
<td rowspan="4" valign="top">/cvsroot/modeling</td>
+
<td rowspan="4" valign="top">org.eclipse.emf/org.eclipse.emf.ecore.sdo</td>
+
</tr>
+
<tr>
+
<td>plugins</td>
+
<td>contains the SDO plug-ins</td>
+
</tr>
+
<tr>
+
<td>features</td>
+
<td>contains the SDO features</td>
+
</tr>
+
<tr>
+
<td>doc</td>
+
<td>contains the SDO documentation plug-ins and features</td>
+
</tr>
+
<tr>
+
<td rowspan="5" valign="top">/cvsroot/modeling</td>
+
<td rowspan="5" valign="top">org.eclipse.mdt/org.eclipse.xsd</td>
+
</tr>
+
<tr>
+
<td>plugins</td>
+
<td>contains the XSD runtime plug-ins</td>
+
</tr>
+
<tr>
+
<td>features</td>
+
<td>contains the XSD runtime features</td>
+
</tr>
+
<tr>
+
<td>doc</td>
+
<td>contains the XSD documentation plug-ins and features</td>
+
</tr>
+
<tr>
+
<td>examples</td>
+
<td>contains the XSD examples</td>
+
</tr>
+
</table>
+
 
+
EMF and SDO are components of the [http://www.eclipse.org/modeling/emf/ EMF Project]. XSD is a component of the [http://www.eclipse.org/modeling/mdt/ MDT Project].
+
 
+
===Build tag and branch naming conventions===
+
 
+
For each build, a new CVS tag is created. The name of the CVS tag follows this convention:
+
 
+
build_&lt;build id&gt;
+
 
+
where &lt;build id&gt; is usually the build timestamp in the yyyyMMddhhmmss format (for example,  20040211140643).
+
 
+
The HEAD branch always contains the latest file versions, which are currently under active development. If a fix is required for a particular past build (typically a release), a branch will be created.  The branch naming convention is:
+
 
+
branch_&lt;build id&gt;
+
 
+
The structure of the CVS repository is shown below:
+
 
+
[[Image:EMF_getting_sources_img3.jpg]]
+
 
+
If for some reason you need to get files from a certain build, look under "Versions" for the tag that identifies that build.
+
 
+
 
+
==Checking Out Code as an Anonymous User==
+
 
+
An anonymous user has access only to check out files from the CVS repository. This user does not have the privileges to check in files.
+
 
+
===Configuring the CVS client to check out files===
+
 
+
* Open the CVS perspective in the Eclipse Workbench by selecting <b>Windows > Open Perspective > CVS Repository Exploring</b>. 
+
 
+
* Right click on the CVS Repositories view as shown below, and select <b>New > Repository Location...</b>
+
 
+
[[Image:EMF_getting_sources_img4.jpg]]
+
 
+
* Enter the information as shown below in the Add CVS Repository dialog and click <b>Finish</b>. This will establish a connection with the /cvsroot/modeling repository located on dev.eclipse.org, using the anonymous user ID.  Make sure you set the connection type to pserver and use the default port, as shown.
+
 
+
[[Image:EMF_getting_sources_img5.jpg]]
+
 
+
 
+
==Checking out code for the first time==
+
 
+
If you followed the instructions in the previous section, you should see a new repository entry in the CVS Repositories view. To check out code, do the following:
+
+
* Expand the repository node.
+
* Expand the HEAD node, as shown below, to view all the modules in the repository.
+
* Scroll down and expand the <code>org.eclipse.emf/org.eclipse.emf</code> module, as shown below. Select the subdirectories of the features, plugins, docs, tests, and examples directories that you want to retrieve.
+
* Repeat for <code>org.eclipse.emf/org.eclipse.emf.ecore.sdo</code> and <code>org.eclipse.mdt/org.eclipse.xsd</code>
+
* Right click and select the <b>Check Out</b> menu option.
+
 
+
[[Image:EMF_getting_sources_img6.jpg]]
+
 
+
* Each selected directory as is checked out as a project in the workspace.  Once the operation is complete, you can switch to the Java perspective to work with the projects.
+
 
+
 
+
==Resolving Dependency Problems==
+
 
+
You may find that the projects have compilation errors after you check them out.  To resolve these, update the classpath. Right click on the project and select the <b>PDE Tools > Update Classpath...</b> menu option as shown below. The Java Classpath dialog appears.
+
 
+
[[Image:EMF_getting_sources_img7.jpg]]
+
 
+
Ensure that any projects with dependency problems are checked in the list of available plug-ins and fragments, and then click <b>Finish</b>.
+
 
+
[[Image:EMF_getting_sources_img8.jpg]]
+
 
+
 
+
==Synchronizing your Local Sandbox with the HEAD Branch==
+
 
+
* As described above, the HEAD branch contains the latest verision of the code. To synchronize your local changes with the HEAD, right click on the resource that you want to synchronize, and then select:
+
 
+
Team > Synchronize with Repository
+
 
+
* This opens the Synchronize view. For more on using this view, see [http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.user/reference/ref-33.htm CVS Workspace Synchronization].
+
 
+
* You can merge in the changes from the HEAD manually or automatically. To merge automatically, right click on the resource you want to merge.  Select:
+
 
+
Team > Update
+
 
+
* If there are conflicts that cannot be resolved automatically, CVS will insert special markup in the file to indicate that those lines could not be merged.  You will need to resolve the conflicts manually.  See also [http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-113b.htm Resolving conflicts]
+
 
+
 
+
[[Category:EMF]]
+

Latest revision as of 13:38, 11 December 2007

Back to the top