Model driven software engineering aims at creating high level executablemodels which may be interpreted or compiled. For efficient execution ofoperations on model instances code generators play an important role. A wellestablished tool for structural modeling and code generation is the Eclipse Modeling Framework (EMF). We extended EMF by behavior modeling within ModGraph, a tool to model behavior by graph transformation rules. Each rule corresponds to an operation modeled in the Ecore class diagram. This paper focuses on ModGraph’s code generator. Therefore I describe the matching of graph transformation rules as well as the exact translation of a rule and its seamless injection into the existing EMF Java code. A running example of a simple calendar application complements the explanation.
展开▼