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 "Texo/Developing"

(CVS)
(Setup Development environment)
 
(13 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
This page outlines how to setup a development environment to develop in Texo.  
 
This page outlines how to setup a development environment to develop in Texo.  
  
== CVS ==
+
== GIT ==
The Texo project can be found in cvs in this location:
+
The Texo project uses git. Texo core is at git on eclipse.org, the example projects are hosted on github [https://github.com/mtaal/texo here].  
* dev.eclipse.org
+
* /cvsroot/modeling
+
* org.eclipse.emf/org.eclipse.emf.texo
+
  
Within this last path you will find several subfolders:
+
To clone the eclipse.org git repository use this command:
 +
* committers:
 +
git clone ssh://committer_id@git.eclipse.org/gitroot/texo/org.eclipse.emf.texo.git
 +
* non-committers:
 +
git clone http://git.eclipse.org/gitroot/texo/org.eclipse.emf.texo.git
 +
 
 +
You can browse the Texo git repository: {{Git|texo|org.eclipse.emf.texo.git}}
 +
 
 +
Within the git repository you will find the projects structured as follows:
 
* features: contains the feature projects
 
* features: contains the feature projects
* plugins: contains the plugins
+
* infra: contains both developer setup as well as the build setup projects
* releng: the build setup
+
* core: contains the core plugins used both when generating code, at runtime and during testing
 +
* runtime: the plugins for running texo on the server (in combination with the core plugins)
 
* tests: the plugins used for testing
 
* tests: the plugins used for testing
* develop: the developer environment setup
+
 
 +
For more information on git and eclipse see these pages:
 +
* [http://wiki.eclipse.org/Git Git at eclipse.org]
 +
* [http://eclipse.org/egit/ EGit]
 +
 
 +
Texo moved to Git in November 2011, the previous cvs repository is not available anymore. See [http://archive.eclipse.org/modeling/emft/texo/texo.cvs.tgz here] for the archived cvs repository.
  
 
== Commit Mailing List ==
 
== Commit Mailing List ==
To subscribe to the commit mailing list visit this page: [https://dev.eclipse.org/mailman/listinfo/texo-commit https://dev.eclipse.org/mailman/listinfo/texo-commit}.
+
To subscribe to the commit mailing list visit this page: https://dev.eclipse.org/mailman/listinfo/texo-commit.
  
 
== Setup Development environment ==
 
== Setup Development environment ==
  
 
Texo has the following dependencies:
 
Texo has the following dependencies:
* Eclipse 3.6 (Helios)
+
* Eclipse 3.7 or higher
* EMF 2.6
+
* EMF 2.7 or higher
* XPand
+
* XPand and XText
* MWE
+
 
+
Eclipse 3.6 can be downloaded from [http://www.eclipse.org/downloads/ here], as Eclipse 3.6 is still in development go to the 'development builds' tab.
+
  
EMF is possibly already present as part of the Eclipse 3.6 install.
+
Eclipse can be downloaded from [http://www.eclipse.org/downloads/ here].
  
XPAND/MWE and EMF 2.6 can be installed through the update manager (type the names mwe, xpand etc. in the search box): http://download.eclipse.org/releases/helios
+
EMF is possibly already present as part of the Eclipse install.
  
Then to get all the development projects do the following:
+
XPAND and EMF can be installed through the update manager (type the names mwe, xpand etc. in the search box):
# Download the Texo Develop project from the above CVS location (the project can be found in the org.eclipse.emf/org.eclipse.emf.texo/develop folder in CVS).
+
* http://download.eclipse.org/releases/luna
# Open the Texo Develop project and right click on texo.psf and select 'Import Project Set'. Say yes when the system asks to overwrite Texo Develop.
+
* http://download.eclipse.org/releases/juno
# The development projects will now be downloaded and created.
+
* http://download.eclipse.org/releases/kepler
 +
* http://download.eclipse.org/releases/helios
 +
* http://download.eclipse.org/releases/indigo
  
The development projects are organized in working sets which you can enable.
+
To get all the development projects clone the git repository as outlined above and import all the projects in the repository.  
  
 
As a next step import the clean up and formatter profiles. These can be found in the Texo Develop project.  
 
As a next step import the clean up and formatter profiles. These can be found in the Texo Develop project.  
Line 68: Line 78:
 
  * <copyright>
 
  * <copyright>
 
  *
 
  *
  * Copyright (c) 2009, 2010 Springsite BV (The Netherlands) and others
+
  * Copyright (c) 2011 Springsite BV (The Netherlands) and others
 
  * All rights reserved. This program and the accompanying materials
 
  * All rights reserved. This program and the accompanying materials
 
  * are made available under the terms of the Eclipse Public License v1.0
 
  * are made available under the terms of the Eclipse Public License v1.0
Line 136: Line 146:
 
* [http://www.eclipse.org/modeling/emf/?project=emf EMF XMI/XML]: for XML Serialization
 
* [http://www.eclipse.org/modeling/emf/?project=emf EMF XMI/XML]: for XML Serialization
 
* [http://www.eclipse.org/modeling/m2t/?project=xpand Xpand/Xtend]: for code generation
 
* [http://www.eclipse.org/modeling/m2t/?project=xpand Xpand/Xtend]: for code generation
* [[Modeling_Workflow_Engine_(MWE)|MWE]]: code generation workflow
 
 
* JMerge (part of EMF): for merging generated code with manually changed code
 
* JMerge (part of EMF): for merging generated code with manually changed code
 
* JDT: for postprocessing of generated classes (organize imports)
 
* JDT: for postprocessing of generated classes (organize imports)
  
 
The build environment has been setup using [http://www.eclipse.org/buckminster/ Buckminster] and [http://hudson-ci.org/ Hudson].
 
The build environment has been setup using [http://www.eclipse.org/buckminster/ Buckminster] and [http://hudson-ci.org/ Hudson].
 
For the future (generation of web ui's) the [[pmf|Presentation Framework Project]] will probably be used.
 
  
 
== Interesting links ==
 
== Interesting links ==

Latest revision as of 08:15, 27 December 2014

Introduction

This page outlines how to setup a development environment to develop in Texo.

GIT

The Texo project uses git. Texo core is at git on eclipse.org, the example projects are hosted on github here.

To clone the eclipse.org git repository use this command:

  • committers:

git clone ssh://committer_id@git.eclipse.org/gitroot/texo/org.eclipse.emf.texo.git

  • non-committers:

git clone http://git.eclipse.org/gitroot/texo/org.eclipse.emf.texo.git

You can browse the Texo git repository: org.eclipse.emf.texo.git (browse, stats, fork on OrionHub)


Within the git repository you will find the projects structured as follows:

  • features: contains the feature projects
  • infra: contains both developer setup as well as the build setup projects
  • core: contains the core plugins used both when generating code, at runtime and during testing
  • runtime: the plugins for running texo on the server (in combination with the core plugins)
  • tests: the plugins used for testing

For more information on git and eclipse see these pages:

Texo moved to Git in November 2011, the previous cvs repository is not available anymore. See here for the archived cvs repository.

Commit Mailing List

To subscribe to the commit mailing list visit this page: https://dev.eclipse.org/mailman/listinfo/texo-commit.

Setup Development environment

Texo has the following dependencies:

  • Eclipse 3.7 or higher
  • EMF 2.7 or higher
  • XPand and XText

Eclipse can be downloaded from here.

EMF is possibly already present as part of the Eclipse install.

XPAND and EMF can be installed through the update manager (type the names mwe, xpand etc. in the search box):

To get all the development projects clone the git repository as outlined above and import all the projects in the repository.

As a next step import the clean up and formatter profiles. These can be found in the Texo Develop project.

  • Goto Window > Preferences
  • To Java > Code Style > Formatter and click import, find the texo_formatter.xml in the Texo Develop project on your file system and import it
  • To Java > Code Style > Clean Up and click import, find the texo_cleanup.xml in the Texo Develop project on your file system and import it

Testing

This is by far the most important must-do. Code and functionality must be supported with Junit test cases. Each plugin should have an equivalent *.test plugin which contains testcases which test the functionality.

Although many developers like testng, Texo uses Junit because it is slightly better supported by Eclipse and Eclipse build environments.

Texo currently does not use code coverage tools. There is however the wish to add this in the future.

JDK 1.5

Texo should be compiled for the JDK 1.5 platform. This is normally setup correctly in each plugin.

Code Formatting

The plugin projects have been set up to format the code using the Texo profile when saving a file. The Texo profiles can be found in the develop project.

Copyright

All files should start with a copy right section like this:

/**
 * <copyright>
 *
 * Copyright (c) 2011 Springsite BV (The Netherlands) and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Martin Taal - Initial API and implementation
 *
 * </copyright>
 *
 * $Id: AbstractModelFeatureMapEntry.java,v 1.2 2010/01/30 15:59:35 mtaal Exp $
 */

(copyright holder and contributors ofcourse set to the one creating/adapting the file)

Javadoc, Documentation

Javadoc:

  • All public and protected methods must have javadoc, except for getters and setters which do not do more than just set/get a value.
  • There must be javadoc in the class header.

The following guidelines should be followed when documenting code:

  • comment special cases in the code or special conditions/invariants
  • rather use clear and describing variable and method names than comments
  • always add comments to empty catch blocks
  • use common sense

Formatting and compiling settings

Each plugin project has to use the same settings for formatting as in the org.eclipse.emf.texo project. Specifically in the project properties:

  • Java Code Style > Clean Up: 'Enable project specific settings' has to be checked and use the Texo profile (which can be found in the Texo Develop project).
  • Java Code Style > Formatter: 'Enable project specific settings' has to be checked and use the Texo profile (which can be found in the Texo Develop project).
  • Java Compiler: 'Enable project specific settings' has to be checked and use the J2SE-1.5 as specified in the plugin (see below)
  • Java Editor > Save Action: 'Enable project specific settings' has to be checked and has to be set in the same way as in the org.eclipse.emf.texo project
  • Plug-in Development > Plug-in Manifest Compiler: has to be set in the same was as in the org.eclipse.emf.texo project

Plugin and Feature setup

See also this description for standards for Features and Plugins of the Modeling project and these guidelines from the Common-Build-Infrastructure.

A summary:

When creating a new plugin/feature for Texo then the same structure has to be followed as is visible in the org.eclipse.emf.texo plugin and feature. The following files should be present in the root:

  • about.html
  • copyright.txt
  • epl-v10.html
  • license.html
  • plugin.properties with pluginName and providerName externalized

A feature project has the following additional files:

  • about.ini
  • about.properties
  • modeling32.png

The version of the plugin and feature have to end with .qualifier (for example 0.1.0.qualifier).

The build.properties should include all these files in the build.

All plugins should use the J2SE-1.5 execution environment.

All the above files can be copied from the org.eclipse.emf.texo plugin/feature project.

Eclipse Components and Projects used by Texo

  • EMF Ecore: for runtime model support
  • EMF XMI/XML: for XML Serialization
  • Xpand/Xtend: for code generation
  • JMerge (part of EMF): for merging generated code with manually changed code
  • JDT: for postprocessing of generated classes (organize imports)

The build environment has been setup using Buckminster and Hudson.

Interesting links

Here are links related to coding practices:

Back to the top