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 "EEF/User Guide/Custom Widget Generation"

(Environment initialization)
Line 18: Line 18:
  
 
The other data are marginal, we will erase the generated body of this module.
 
The other data are marginal, we will erase the generated body of this module.
 +
 +
We also have to add to the generator project a dependency to the EEF Codegen plugin : org.eclipse.emf.eef.codegen.
 +
 +
[[Image:EEF_CustomGen_CodegenDependencyAdd.png | All generator projects extending EEF must have a dependency on its generation project]]
 +
 +
And finally, we add an Extension to the generator project. The ''org.eclipse.acceleo.engine.dynamic.templates'' defines a project as an dynamic module able to extend existing generators. In this extension, we must specify the folders containing dynamic modules. In our case, we can specify the folder ''org/eclipse/emf/samples/eef/gen/spinner/common''.
 +
 +
[[Image:EEF_CostumGen_DynExtensionPoint.png | All generator projects extending EEF must be defined as Acceleo dynamic modules ]]
 +
 +
After these step, we can create our modules to generate spinner with EEF.
 +
 +
== Creating Acceleo modules to generate spinner ==

Revision as of 12:31, 6 January 2012

Need to generate new widgets ?

In the CustomElementEditor guide, we saw how to ponctually include specific widgets in EEF generated editing forms. If this need is becoming common, EEF offers the ability to extend its generators to generate new widgets.

Environment initialization

As we will create acceleo generator, we need to install the Acceleo SDK. It can be done via the release train:

acceleo install

Next, in an empty workspace, we create an Acceleo Project. In the new project wizard, we can initialize our first template:

Acceleo project creation

Let's name it spinnerGettersSetter. It need two metamodels:

The other data are marginal, we will erase the generated body of this module.

We also have to add to the generator project a dependency to the EEF Codegen plugin : org.eclipse.emf.eef.codegen.

All generator projects extending EEF must have a dependency on its generation project

And finally, we add an Extension to the generator project. The org.eclipse.acceleo.engine.dynamic.templates defines a project as an dynamic module able to extend existing generators. In this extension, we must specify the folders containing dynamic modules. In our case, we can specify the folder org/eclipse/emf/samples/eef/gen/spinner/common.

All generator projects extending EEF must be defined as Acceleo dynamic modules

After these step, we can create our modules to generate spinner with EEF.

Creating Acceleo modules to generate spinner

Back to the top