Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Plugin/Feature Configuration Guidelines"

(added descripion for model generation)
(Formatting & co)
Line 25: Line 25:
  
 
== Formatting &amp; co<br>  ==
 
== Formatting &amp; co<br>  ==
 +
*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 Text file encoding to UTF-8
Line 35: Line 40:
 
*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".<br>
 
*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".<br>
 
<br/>
 
<br/>
*The lazy 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.
 
  
 
== Generating new models ==
 
== Generating new models ==

Revision as of 10:58, 16 October 2013

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.emf.ecp". 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.5, so please select "J2SE-1.5". (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 dependencies

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

  • 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.

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