UML includes different behaviour modelling paradigms. It however includes no equivalent to behaviour definition through a sequence of statements as provided by object-oriented programming languages. For certain cases, however, it is most convenient to use this imperative programming concept to define behaviour. Today this is often done by attaching a fragment of Java or C code to the UML Operation as plain text that is later injected into the generated code.
Both the UML and JaMoPP metamodels define the concepts of the corresponding language in a very fine-grained manner, such that they can be integrated at different points. To tackle the problem above, we defined a new kind of behaviour paradigm for UML by subclassing UML's Behavior metaclass. This new metaclass makes use of the Method metaclass of the JaMoPP metamode - the part of JaMoPP's metamodel and concrete syntax for method body specification is thus reused to specify statement-based UML behaviour. This integration can be extended by adapting similar concepts found in both metamodels, such as Class, Parameter, etc.
Figures 1 and 2 show screenshots of the application.