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 "Setting up a development environment for EMF Compare"

(New page: ==Dependencies== * Eclipse Developping on EMF Compare requires the use of Eclipse Platform 3.3 at least, though it is possible to use the latest releases as well. It can be obtained throu...)
 
(Developping EMF Compare patches or code)
Line 48: Line 48:
  
 
Your formatter will now comply to EMF Compare code style. Hitting ctrl+shift+F in a java editor will format your class to follow this style.
 
Your formatter will now comply to EMF Compare code style. Hitting ctrl+shift+F in a java editor will format your class to follow this style.
 +
 +
===Java===
 +
EMF Compare is build against Java 1.5 : usage of the JDK 1.6 API will result in build errors and should be avoided.
 +
 +
===API Tooling===
 +
[PENDING]

Revision as of 08:54, 18 February 2009

Dependencies

  • Eclipse

Developping on EMF Compare requires the use of Eclipse Platform 3.3 at least, though it is possible to use the latest releases as well. It can be obtained through the Eclipse download page.

  • EMF

EMF Compare heavily relies on EMF and requires version 2.3 at least. We recommend using the SDK so as to have access to the sources as well. See the EMF downloads page

Checking out the code

Using Project Set File (PSF)

  • Download the PSF file and save it on your computer.
  • Open Eclipse and switch to the Java perspective
  • Through the File menu, select File => Import and in the Import popup, select Team => Team Project Set and hit "Next"
  • Open the psf file you saved on your disk
  • Eclipse might prompt you to create the repository. Do so by either choosing pserver connection with "anonymous" as your user name, or extssh connection if you are a commiter.
  • Each plugin will be checked out in your workspace

Manual check out

[PENDING]

Developping EMF Compare patches or code

Checkstyle

The EMF Compare team uses Checkstyle with its own set of rules in order to have an homogeneous code style throughout the plugins and features.

The Eclipse plugin for Checkstyle can be downloaded on sourceforge. Once installed, it will be automatically applied to all existing EMF Compare plugins as they are already configured to use it. New projects can use the same set of rule :

  • Right-click on the project which has to be checked through Checkstyle and select "Properties".
  • In the "Checkstyle" category, go to the "Local Checkstyle configuration" tab
  • Hit "New" and select "project-relative configuration" from the "type" drop down menu. Set the name of this configuration as you see fit ("EMF Compare" for example) and click the "Open..." button for the localisation.
  • Browse to "org.eclipse.emf.compare/codeStyle" and select EMFCompareCheckstyleConfiguration.xml. Select "Ok" twice to end this wizard.
  • Go back to the "General" tab, then tick "Activate Checkstyle on this project"
  • In the drop-down below, select the configuration you just created, the click OK to close the properties dialog.
  • That's it : your project will now go through the EMF Compare Chekstyle rules on each compilation.

Note that Checkstyle errors are not considered fatal compilation errors : you can still run code with checkstyle errors. Nearly each of EMF Compare check is set to report an error though, as we always try and comply to these rules.

Code Formatting

At first, most of the checkstyle errors that will be reported will probably be formatting errors : you can configure your formatter to use EMF Compare configuration to avoid these.

  • Click on Window => Preferences
  • Browse to the "Java => Code Style => Formatter" category and click on the "Import" button
  • Browse to the "<workspace>/org.eclipse.emf.compare/codeStyle" directory and select "EMFCompareformatter.xml"
  • hit Ok twice to close the preferences dialog

Your formatter will now comply to EMF Compare code style. Hitting ctrl+shift+F in a java editor will format your class to follow this style.

Java

EMF Compare is build against Java 1.5 : usage of the JDK 1.6 API will result in build errors and should be avoided.

API Tooling

[PENDING]

Back to the top