Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[] Announcing the OCL 2 Java code generator


The OCL 2 Java code generator has now been pushed to master, however because of cyclic dependencies via Acceleo, it cannot be included in the Core build. Hopefully a Tools build will be available soon. In the meantime fetch examples/org.eclipse.ocl.examples.codegen from GIT.

Examples of generated code may be found in org.eclipse.ocl.examples.xtext.tests/src/codegen/company.*


CodegencompanyTables provides the dispatch tables
impl/*Impl contains the API conversion calls to the OCL bodies
bodies/*Bodies contains the per-class OCL bodies

All the current delegates tests pass successfully handling recursions, tuples and allInstances on Ecore without needing a dynamic pivot model.

Only slight difference is the severity and spelling of the default "is not satisfied" message.

Code generation can be enabled/disabled by

<genAnnotations source="";>
<details key="Use Delegates" value="false"/>

in the GenModel. The default is to not use delegates so just install (or import and invoke a run-time Eclipse) the ocl.examples.codegen plugin and re-genmodel to replace delegates by direct code.

Axel: A similar annotation could enable whatever is appropriate for activating the Impact Analyzer.


        Ed Willink

Back to the top