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

Papyrus-RT/Developer/Design/0.8/Codegen Extension

< Papyrus-RT‎ | Developer‎ | Design
Revision as of 17:31, 3 September 2015 by Unnamed Poltroon (Talk) (Created page with "==Extending the code generator== The PapyrusRT code generator can be extended using the Eclipse plugin extension mechanism. The <code>org.eclipse.papyrusrt.codegen.cpp</code>...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Extending the code generator

The PapyrusRT code generator can be extended using the Eclipse plugin extension mechanism. The org.eclipse.papyrusrt.codegen.cpp plugin defines an extension point called generator to provide generator classes. A plugin for a custom generator needs to define an extension linked to this generator extension point, and specify a custom generator class implementing this extension. The custom generator must be a subclass of AbstractCppGenerator, defined in the same org.eclipse.papyrusrt.codegen.cpp plugin.

In the definition of the extension, the type must be one of the following:

  • ClassGenerator
  • CapsuleGenerator
  • ProtocolGenerator
  • StateMachineGenerator
  • StructureGenerator

The class associated to the extension must implement the AbstractCppGenerator.Factory interface, which is used by the generator to create instances of each specific generator.

Back to the top