Difference between revisions of "EMF/ExtendingCodeGeneration"

From Eclipsepedia

< EMF
Jump to: navigation, search
(Summary)
(GeneratorAdapter Class)
Line 15: Line 15:
 
{
 
{
 
</source>
 
</source>
 +
 +
The GenBaseGeneratorAdapter base class  provide you the basic implementation you have to override:
 +
* canGenerate
 +
* generateXXXX
 +
 +
It's depend of the project type what generate method's you override. The following types you know from the menu in the Gen Model.
 +
 +
* MODEL_PROJECT_TYPE
 +
* EDIT_PROJECT_TYPE
 +
* EDITOR_PROJECT_TYPE
 +
* TESTS_PROJECT_TYPE
  
 
= Links =  
 
= Links =  

Revision as of 07:32, 5 January 2011

Summary

The intension of this page to collect experiences of implementing a Generation Adapter.

The a reference implementation is the project org.eclipse.emf.examples.generator.validator (see :pserver:anonymous@dev.eclipse.org:/cvsroot/modeling under org.eclipse.emf/org.eclipse.emf/examples)


GeneratorAdapter Class

The definition links like this

public class GenClassValidatorGeneratorAdapter extends GenBaseGeneratorAdapter
{

The GenBaseGeneratorAdapter base class provide you the basic implementation you have to override:

  • canGenerate
  • generateXXXX

It's depend of the project type what generate method's you override. The following types you know from the menu in the Gen Model.

  • MODEL_PROJECT_TYPE
  • EDIT_PROJECT_TYPE
  • EDITOR_PROJECT_TYPE
  • TESTS_PROJECT_TYPE

Links