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

Texo/Developing

Introduction

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

Texo has the following dependencies:

  • Eclipse 3.6
  • EMF 2.6

EMF is either already installed in your Eclipse 3.6 version or it can be downloaded/installed through the update manager (Helios releases site).

CVS

The Texo project can be found in cvs in this location:

  • dev.eclipse.org
  • /cvsroot/modeling
  • org.eclipse.emf/org.eclipse.emf.texo

Within this last path you will find several subfolders:

  • features: contains the feature projects
  • plugins: contains the plugins
  • releng: the build setup
  • tests: the plugins used for testing
  • develop: the developer environment setup

Setup

Download the developer project from the above cvs location and then in the org.eclipse.emf/org.eclipse.emf.texo/develop folder.


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 and headers

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

/**
 * <copyright>
 *
 * Copyright (c) 2009, 2010 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)

A class should always have a class header javadoc

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 name than comments
  • always add comments to empty catch blocks
  • use common sense

Formatting, compiling and warnings/error 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.

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.

Interesting links

Here are links related to coding practices:

Back to the top