The user interface comprises
The Project Property Pages are accessible by invoking Properties from the right button context menu of a project.
In principle, it is possible to specify project-specific settings, however in practice is not often possible for application code to determine the prevailing project. Project-specific properties are therefore often ignored and may be removed in a future release.
The Property pages are:
The Workspace Preference Pages are accessible by invoking Preferences from the Window menu on the toolbar.
The Preference pages are:
The two overall options are independent of the Ecore/UML/Pivot bindings.
The Eclipse OCL project provides two execution engines which may be used to support EMF Delegates.
EMF Delegate annotations referencing the
http://www.eclipse.org/emf/2002/Ecore/OCL/LPG
URI are serviced by the legacy evaluator that uses the LPG parser.
This URI was introduced in the Indigo release.
EMF Delegate annotations referencing the
http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
URI are serviced by the new experimental evaluator that uses the UML-aligned Pivot model.
This URI was introduced in the Indigo release and was imposed by the Indigo OCLinEcore editor.
EMF Delegate annotations referencing the
http://www.eclipse.org/emf/2002/Ecore/OCL
URI are serviced by the evaluator selected on the preference page by the
Default Delegation Mode.
This URI was introduced in the Helios release and was imposed by the Helios OCLinEcore editor.
Use of an Indigo or Juno editor converts the URI to use the Pivot evaluator.
Juno introduces an experimental ability to replace the delegated interpreted execution of OCL by direct execution of compiled Java code.
This option may be selected to change the realization of OCL option.
Selecting the default delegation mode retains the Helios and Indigo functionality whereby genmodel generates Java code that encodes the OCL expressions as text strings. Each expression is lazily compiled at run-time with the result being cached to reduce overheads for repeated execution.
Selecting Java code generation causes genmodel to run Acceleo templates that generate
a Package Tables.java file
a bodies package with Class Bodies.java files
The tables file contains an optimised model representation allowing polymorphic operations to be dispatched in constant time.
The bodies files contain a Java class for each OCL expression in each model class.
The implementation files provide wrappers around the bodies to support their invocation for the Ecore API.
Disclaimer: the generated code is experimental has yet to be optimized and so is only about five times faster than the interpreted execution.
The standard Xtext syntax coloring facilities are provided for each of the OCL editors.