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

Plugin/Feature Configuration Guidelines

This page describes the guidelines when creating new plugins and features for EMFStore or ECP.

For the following settings we assume that we want to create a new plugin "example".

General settings

These settings can be modified in the "New Plug-in Project/New Feature" wizards.

  • Namespace: The plugin-name should begin with "org.eclipse.emf.emfstore" or "org.eclipse.emfforms". Therefore the name of our example plugin and the prefix for the packages would be "org.eclipse.emf.emfstore.example". The name of a feature would be e.g. "org.eclipse.emf.emfstore.example.feature".
  • Execution Environment: As JRE version the plugin should use 1.6, so please select "J2SE-1.6". (Note that a feature does not have this setting.)
  • Version: As version please use the current version (see in other plugin) plus the qualifier, e.g. "1.0.0.qualifier".
  • Name: Enter a describing name for your plugin, e.g. "Cool Example Plugin".
  • Provider: For the provider please enter "Eclipse Modeling Project".

Plugin runtime

When defining the export packages on the runtime tab, please note the following:
Plugin should export all defined packages. The exported packages should not be visible usally. If you make a package visible you mark it as API/SPI.

Plugin dependencies

When adding dependencies to your project please note the following giudelines:

Usually we use "Required Plug-ins" to add dependencies that we need. There is one exceptions: If you add dependencies to SWT/JFace you have to use "Imported Packages".

  • Plugins should have the needed minimum version and the next major version as maximum version, e.g. "[4.8.1, 5.0.0)".
  • Reexport dependencies when you use classes from the other plugins in your API.
  • Imported Packages should have the needed minimum version and the next major version as maximum version, e.g. "[4.8.1, 5.0.0)".

Required legal files

When creating a new plugin make sure to copy the "about.html" from an existing plugin to your project. Then open the build.properties and add the about.html to the Binary as well as to the Source Build.

You can check the current state for all required legal files with the reports created during repo aggregation. The build jobs can be found here. The link to the reports for the current release can be found in the tooltip of the runReports job.

Formatting & co

  • We set all setting in a project specific way. Therefore no action is required for existing projects. If you want to create a new bundle, please follow these instructions:
  • The lazy and best way is to copy all files from the .settings folder into the newly created project. You also must copy the .checkstyle file. After that you have to open the project properties and activate checkstyle. The config will already be set to the correct value.

In detail the copy of these files will lead to the following settings, but you do not have to repeat them:

  • Set the Text file encoding to UTF-8
  • Set the New text file line delimiter to Unix
  • For the Formatter enable project specific settings and import the esmFormatter.xml. You can find it in the releng folder.
  • For the Code Templates enable project specific settings and import the esmCodetemplates.xml. You can find it in the releng folder.
  • For the Clean Up enable project specific settings and import the esmCleanUp.xml. You can find it in the releng folder.
  • For the Save Actions enable project specific settings. Enable "Perform the selected actions on save". Enable "Format source code" and select "Format all lines". Enable "Organize imports". Also enable additional actions and configure them like this:EMFStore Config SaveActions.png
  • For the Java Compiler enable project specific settings. Enable "Use compliance from execution environment ...". This should be set to Java 1.5 .
  • Activate checkstyle for your project. Go to Local Check Configurations and create a new configuration. Select "Remote Configuration" the location is "http://download.eclipse.org/emf-store/checkstyle/emfstoreStyle.xml". Enable "Cache configuration file".


Generating new models

If you have to create a new EMF Model follow these steps before generating:

  • Set the formatting of the project according the formatting rules
  • In the genmodel file Set the Copyright Text to:
Copyright (c) 2011-2013 EclipseSource Muenchen GmbH 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:
{userId} - initial API and implementation
  • Set the Code Formatting and the Comment Formatting to true

Back to the top