Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

MDT/New and Noteworthy/1.1


Model Development Tools Release 1.1 New and Noteworthy Items.

For more details about the development plan, see the MDT 1.1 plan.

Back to Modeling Development Tools.


EMF Ontology Definition Metamodel (EODM) Component

EODM 1.0 development has not yet begun. The latest EODM release was 0.9.1 as part of the Europa Winter Maintenance.

Object Constraint Language (OCL) Component

Release 1.2 M6

A few small-ish improvements are made in this milestone, along with a number of bug fixes.

Improved Collection Flattening

The intent of collection flattening in the OCL 2.0 Specification is to produce collections in the same form as OCL 1.x, in which collections could not nest. OCL 2.0 does allow collections to contain other collections, so the flatten() operation is provided to reduce a nested structure to a flat collection.

Through the 1.1 release, the flatten() implementation in MDT OCL has been incorrect: only the first level of nesting is flattened. A Set(Set(Set(Apple))) would be reduced to a Bag(Set(Apple)) instead of a Bag(Apple). This is corrected by bug 217461. After all, a partially-flattened collection isn't really of any use at all.

Implementing an EValidator

The OCL.uml model was updated to add all of the well-formedness constraints specified by OCL for the Types and Expressions packages of the Abstract Syntax. These are documented using the OCL expressions included in the OCL 2.0 Specification. From these constraint specifications, the TypesValidator and ExpressionsValidator are generated as per the EMF validation framework.

This provided the basis for resolving two bugs in the Ecore binding plug-in:

  • bug 213936 for validation extensibility (the currrent visitor design is not extensible) and
  • bug 213096 to override the ENamedElement::WellFormedName constraint from Ecore, which doesn't apply to OCL.

The latter is accomplished by overriding the inherited constraints in an EcoreValidator generated in the OCL binding for Ecore.

The well-formedness rules implemented in the ValidationVisitor are not yet ported to the new validators. This is planned for the next milestone, in bug 224731.

Other Bug Fixes

For other bug fixes, see the OCL 1.2 M6 release notes.

Release 1.2 M5

Development in this milestone was limited to bug fixing.

See the OCL 1.2 M5 release notes for details.

Release 1.2 M4

This was not an ambitious milestone, for the most part simply fixing defects and making one or two small enhancements. A few changes are worth noting because of their impact on API and, in some cases, compatibility with the 1.1 release.

Disposing OCL Environments

A new disposal API is defined for the OCL façade that does whatever is necessary to "clean up" the objects created by the parser, such as constraints, collection types, and variables. More specifically, disposing an OCL instance currently does the following:

  • if the resource in which the environment (variables, collection types, etc.) is persisted was created by the environment and not by a client (to load an existing environment), then that resource is unloaded
  • all Constraints that are not contained in a resource have their adapter lists cleared, recursively over their contents

These measures are particularly important for the UML metamodel binding. In the course of parsing and evaluating OCL expressions, the UML2 API's CacheAdapter will become attached to constraints and other objects created by the parser. It is important that this adapter be removed again from any object that is no longer in use, because otherwise it will retain that object indefinitely (the CacheAdapter is a singleton).

Additional Look-up Exceptions

Two specializations of the LookupException are added to distinguish between ambiguous look-ups and invalid look-ups. The AmbiguousLookupException signals a look-up that resulted in multiple matches that the parser cannot distinguish and the InvalidLookupException signals a look-up that resulted in an unambiguous match that is of the wrong metatype than what is required. For example, a qualified-name look-up for a Classifier or a QVT Transformation might find a Package instead of an instance of the expected metatype.

The Ecore and UML implementations of the Environment are updated to throw these more specific exception types.

Changes in Parsing Behaviour

Two further changes were implemented in the OCL parser's behaviour that have an impact on compatibility with the 1.1 release. These address Bug 197396 and Bug 212804. The former improves the parser's compliance with the OCL specification of definition constraints; compatibility with the 1.1 release is available by enabling the ParsingOptions::DEFINITION_CONSTRAINS_FEATURE option. The latter eliminates an obsolete mapping of the relational operators (< <= >= >) to the Java-ish compareTo() operation; compatibility with the 1.1 release is available by enabling the ParsingOptions::USE_COMPARE_TO_OPERATION option.

Other Bug Fixes

For other bug fixes, see the OCL 1.2 M4 release notes.

Release 1.2 M3

OCL Grammar and Parser API Refactoring

This milestone delivers the long-awaited refactoring of the OCL LPG grammar and associated parser API, contributed by Ed Willink from the GMT project's UMLX component.

The major new API in this contribution is defined in the org.eclipse.ocl.lpg and org.eclipse.ocl.parser packages. Included is an implementation of an EssentialOCL grammar (EssentialOCL.g) which is included in the full grammar (OCLParser.g). The former OCLParser class (which was internal) is refactored to separate the concrete syntax and abstract syntax parsing phases, implemented by the public classes OCLParser and [1] OCLAnalyzer, respectively.

Abstract LPG-parsing API is provided by the org.eclipse.ocl.lpg package, with abstract definitions of lexers, parsers, and analyzers. These are accompanied by a BasicEnvironment interface that provides core services such as a new pluggable ProblemHandler for flexible reporting of parsing/analysis problems.

See Bug 176110 for further details.

Navigation of Unnamed Association Ends

The UML metamodel binding now supports parsing and evaluation of OCL expressions that navigate unnamed association ends. The OCL convention for unnamed ends defines an implicit name which is the name of the classifier at that end with the initial letter in lower case. MDT OCL supports evaluation of such navigation expressions, where the implicit end name is unambiguous, on:

instances of UML2-generated metamodels:

Navigating unnamed metamodel association ends

and on instance specifications in UML models:

Navigating unnamed model association ends

Other New API

As part of the refactoring of the parser API, this milestone introduces some new optional interfaces that environments may choose to implement. To maintain API compatibility, OCL employs an optional Adaptable interface similar to Eclipse Platform's IAdaptable that is available is stand-alone deployments. The OCLUtil class provides utilities to obtain adapters from parsing and evaluation environments for these optional interfaces.

One noteworthy new optional interface is Customizable, which defines a protocol for customizing the parsing and evaluation of OCL constraints via Options. Parsing options available so far include:

Evaluation options available so far include:

Other Bug Fixes

For other bug fixes, see the OCL 1.2 M3 release notes.

OCL Tools Component

OCL Tools is a recently added component to the Model Development Tools (MDT) Project aiming at providing first-class support to modelers working with specifications containing expressions written in OCL, the Object Constraint Language. Such support includes editing, refactoring, code generation, execution, and interactive debugging of the OCL constraints given for some underlying (Ecore or UML2) class model. The functionality of OCL Tools builds upon the MDT OCL component, and has been seeded with two initial contributions:

  • an OCL -> Java compiler, that as of now takes as input an .ecore and a textual file containing OCL constraints (handling UML2 is in the ToDo list). This compiler extends EMF code generation, producing Java 5 source code with side-effects-free methods for the given OCL invariants, pre- and postconditions, and derived attributes and operations.
  • an OCL text editor, supporting usability features such as AutoCompletion, navigation by means of hyperlinks, structured views (for the outline of a document and for the Abstract Syntax Tree of an OCL constraint), among others. Although MDT OCL itself is completely fluent in both Ecore and UML2, only the Ecore binding is supported by the OCL text editor at this time.

A longer intro to OCL Tools can be found at

Unified Modeling Language 2.x (UML2) Component

Release 2.2 M7

The M7 milestone focused mainly on bug fixing.

One area that was scrutinized was: package merge. It was discovered that the existing package merge algorithm could result in infinite looping if users incorrectly created circular dependencies on packages or if the resulting merge resulted in circular inheritance chains. The code was made more robust by detecting such cycles and stopping in such cases. This will have impact on users wishing to create DSL's using package merge concepts.

Fixes include:

  • Bug 228754 UML models do not open properly if there is a circular inheritance chain
  • Bug 229338 Package merge could result in infinite looping

Another nagging issue that was addressed was the fact that users could get concurrent modification exceptions when unloading resources as a result of the cache adapter not being thread safe.

  • Bug 220065 ConcurrentModificationException when unloading resources

Other notable fixes:

  • Bug 227892 Can't load model with references made using hierarchical URI fragments

Release 2.2 M6

  • Support for camel case names was added: Camel Case
  • Content types for CMOF and UML resources has been added. This will help associate the appropriate default editors with their respective resources.

Release 2.2 M5

  • Users now have the ability to save a UML model in a .CMOF or .XMI format.
    • Invoke the 'File > Save As...' menu item and specify a file with a .cmof extension.
    • To open a .cmof file with the UML editor, select the file in the explorer view and select 'Open With > UML Editor' from the context menu.

Sample UML Model:


Internals of UML Model:


"Save As ..." menu


"Save As" dialog


Internals of CMOF file.


Other defects: UML 2.2 M5 release notes

Release 2.2 M4

This milestone consisted mostly of fixing some defects and making few small enhancements. A few changes are worth noting.

Code template changes

The Javadoc for the UML2 API now contains information about subsetting and redefinition. Such information is useful when trying to navigate the maze of properties and how the UML meta-model is put together.

For example, Package::nestedPackage subsets Package::packagedElement


Profile registry

A new profile registry has been added making the discovery of profiles easier.

Add support for registering dynamic profiles

Release 2.2 M3

Programmers Guide Updates

A programmers guide has been added to the UML2 component. Minor content has been added with the expectation that richer documentation and articles will be added in the future.

UML2 Tools Component

Release 0.8 RC1

Numerous bug fixes in Class diagram and Composite Structures diagram editors. See the UML2Tools 0.8 RC1 release notes for details.

Release 0.8 M7

UML2Tools preferences regrouping

UML2Tools preferences pages were moved into common root 'UML2 Diagrams' (Bug 226663).

UML2Tools PreferencesPages.jpg

Diagram file extension

Diagrams are created in file with shorter extension (Bug 230873):

  • Class diagram: .umlclass
  • Component: .umlcomp
  • Deployment: .umldepl
  • Composite Structures: .umlcsd
  • Use Case: .umlusc
  • Activity: .umlact
  • State Machine: .umlstm

All those changes are backward compatible -- we are processing old diagram files correctly, but all new diagrams are created with short extensions.

Operation Parameters

Dialog to edit operation parameters was added to the context menu of operations. The dialog allow the users to create, remove, reorganize parameters as well as to edit their properties ((Bug 210246)).

UML2Tools OperationParameter.jpg

Extended property sheets

UML2Tools used drop-down lists for editing single-valued references in property sheets before. This is default implementation provided by UML2. The cell editor was extended by using Tree Editor in addition to existing drop-down list (Bug 228478).

Release 0.8 M6

New elements added

  • Behavior port in Composite Structures diagram (Bug 208550).
  • Provided/Required interface links from Port added to Class diagram, Component diagram and Composite Structures diagram editors (Bug 183754).

UML2 specification contains examples of Provided/Required interfaces links from Port. These are derived features, their values are calculated in Port#getProvideds()/getRequireds() methods. Say, the set of provided interfaces of the port is defined by the set of interfaces implemented by port's type classifier. Thus creation of the link on diagram is not related to port itself, but should modify the typing classifier of this port or one of its super-classes.

Usability issues

  • Expanded class improvement in Composite Structures diagram(Bug 225721 and Bug 222108).
  • Possibility to manage Provided/Required interface links (Bug 221145).

This feature considers Required/Provided Interface links, that were mentions above. One Required Interface link can be shown on the diagram several times - the Genuine(original) going out of Classifier and Derived, which is got by Port#getRequireds(), going out of Port. Preferences page 'View Filters' is aimed to manage visibility of such links:

Preferences manage links.jpg

UML2Tools SDK usability

  • Elements from GMFGen extension model(AuxSecondaryDiagramNodeAttribute, SubstitutableByAttributes, ...) are editable in the default GMF editor (Bug 221300).

GMFGen Attributes editor.jpg

See the UML2Tools 0.8 M6 release notes for details.

Release 0.8 M5

New elements added

  • Dependencies added to Component diagram, Use Case diagram and Deployment diagram editors (Bug 218953).
  • Instance Specification for associations added to Class diagram editor (Bug 196137).
  • Conditional Node element is added to Activity diagram editor (Bug 215951).
  • Expansion Region element is added to Activity diagram editor (Bug 209957).

Usability issues

  • Imports compartment in the secondary diagram node is collapsed by default in all diagrams (Bug 216573).
  • Port with with no type is highlighted in Class diagram, Component diagram and Composite Structures diagram editors (Bug 218771).

Port highlighted.jpg

Port pp is highlighted, because its type is null, while port p is not highlighted, as its type is powertrain.

One can modify highlight color by using 'Highligh color' option from 'Appearance' preferences page:

Preferences highlight color.jpg

  • 'Enclosing' presentation for Instance Specification elements is provided in Class diagram editor (Bug 216160).

See the UML2Tools 0.8 M5 release notes for details.

Release 0.8 M4

Use Case diagram added

Plan Item 199725

UML2Tools UseCase.jpg

Deployment diagram added

Plan Item 199724


New elements added

  • Association Class element is displayed correctly (both classifier rectangle and association link are shown) in class diagram editor (Bug 204733).


Association Class is created by using 'Association Class' palette entry from the Nodes group. It's shown as a classifier rectangle, rhombus and link connector between them. So, only its classifier properties are shown after creation. In order to show it's association properties association ends should be created. 'Association End' palette entry from the Link group is used to create ends. On the example picture Association Class Job has two Association Ends - Person and Company.

  • Loop Node element is added to Activity diagram editor (Bug 209952).

UI improvements

  • Label for "ordering", "upper bounds" and "control type" are shown in braces underneath the Object Node in Activity diagram editor (Bug 209959).
  • "entry", "exit" and "do" labels reserved for Activity in State Machine diagram editor (Bug 210098).

See the UML2Tools 0.8 M4 release notes for details.

Release 0.8 M3

Composite Structures diagram added

Plan Item 199723

UML2Tools CompositeStructures.jpg

New elements added

  • Activity Partition element is added to Activity diagram editor (Bug 186990).

See the UML2Tools 0.8 M3 release notes for details.

XML Schema Definition (XSD) Component

Release 2.4 M7

  • Several performance and usability improvements, including
  • Reduction of the number of objects created when parsing a XSD file
  • Performance improvements when validating big elements
  • Reduction of the memory footprint due to the use of the packaged Enum feature introduced in EMF 2.4 (see bug 226815)

Release 2.4 M6

This milestone consisted mostly of fixing some defects and making few small enhancements. See details.

Release 2.4 M5

This milestone consisted mostly of fixing some defects and making few small enhancements. See details.

Release 2.4 M4

This milestone (and those prior) consisted mostly of fixing some defects and making few small enhancements. See details.

One change is worth noting.

Support ecore:suppressSubstitutionGroups

See details here and in bug 211820. See also Exploiting Substitution Groups Without Polluting Your Generated API.

Back to the top