DevBooststLogotudLogorewerseLogo modelplexLogo
crimsonBG
EMFText
The fastest way to refinable, durable and evolution-resistant textual syntaxes for EMF models!

eJava - Java specifications for Ecore's EOperation bodies

A common issue that arises when custom code is needed in EMF-based meta models is the mixing of generated and hand-written code. The problem can be solved using eJava. eJava is based on Java and Ecore. It can be used to specify the behaviour of EOperations with Java statements in separate files on the modelling level.

To provide the implementation for EOperations one simply puts an eJava file next to the Ecore model. eJava automatically adds the code then as Annotation to the EOperation elements in the ecore model. Afterwards the EMF code generation can be used as it is and the generated classes contain the methods from the eJava files. This way, hand-written and generated code is cleanly separated. eJava does also check the implemented methods to make sure no compilation problems occur after generating the code for a Ecore model.

Screenshot

Image:EMFText_Language_Java_eJava.png

CS Specification

eJava.cs

Metamodel

eJava.ecore

eJava.genmodel

Plugins

org.emftext.language.java.ejava

org.emftext.language.java.ejava.edit

org.emftext.language.java.ejava.resource

org.emftext.language.java.ejava.resource.ejava

org.emftext.language.java.ejava.resource.ejava.ui

Examples

JJ

Retrieved from "http://www.reuseware.org/index.php/EMFText_Concrete_Syntax_Zoo_eJava"

This page has been accessed 8,694 times. This page was last modified 07:43, 27 July 2011.