Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

MDT/UML2/UML2 5.0 Migration Guide

< MDT‎ | UML2
Revision as of 20:12, 18 February 2014 by Kenn.hussey.gmail.com (Talk | contribs) (Overview)

Copyright © 2014 CEA

Summary

The intent of this guide is to assist consumers in the process of migrating from the UML2 4.x API, based on the UML 2.4.1 specification, to the new UML2 5.0 API, based on the UML 2.5 specification, and to summarize any new features of the implementation that developers may want to take advantage of.

Kenn Hussey, Christian W. Damus
Last Updated: January 27, 2014

Overview

The Eclipse UML2 (Unified Modeling Language 2.x) project is an EMF-based implementation of the UML 2.x metamodel for the Eclipse platform. This implementation was previously compliant with the 2.4.1 version of the UML specification, for which a newer version, namely 2.5, has been released by the Object Management Group (OMG).

The UML2 metamodel implementation has been enhanced so that it is compliant with the 2.5 version of the UML specification. This enhanced implementation has been delivered as a new version, 5.0, of the UML2 project, to be released as part of the Luna simultaneous release of Eclipse. The source code for this new version of the project is managed in an Eclipse git repository and built, using Buckminster, on the Hudson installation at Eclipse.

UML 2.5 was actually released by the OMG as part of a series of revisions, also known as the “2.5 series”, which includes updated versions of the Meta Object Facility (MOF) and MOF 2 XMI Mapping specifications as well. Based on a careful analysis of the delta between the previous UML2 implementation and the UML 2.5 specification, described in more detail below, it was decided that the new version of UML2 would NOT be compatible with UML2 4.x. UML2 5.0 supersedes previous version(s) of the project (i.e., new major or minor versions of the 4.x stream will NOT be released) and is neither API contract nor binary compatible with UML2 4.x.

While the UML 2.5 specification has been extensively re-written from its previous version to make it easier to read by removing redundancy and increasing clarity, the metamodel itself remains largely unchanged from UML 2.4.1 superstructure, with the following exceptions:

  • The metamodel has been partitioned into packages, corresponding to the clause structure of this specification. All of these packages are owned by a top-level package named UML; they are also imported into UML so that metaclasses may be referred to by their unqualified name in UML.
  • Many OCL constraints have been corrected or added where they were absent. In order to do this, some names of association-owned properties and the corresponding associations have been changed to avoid ambiguity in OCL ex- pressions.
  • A small number of lower multiplicities have been relaxed from 1 to 0, in order to represent default values that cannot be formally represented using MOF. In these cases the absence of a value signifies the presence of a default value. These cases could not be represented at all in earlier versions of UML. They all occur in Clause 15: Activities and are made explicit in the text there.
  • The property LoopNode::loopVariable has been made composite, in order to enable interchange of loop variables, which was not possible in a standard way in UML 2.4.1.
  • An {ordered} constraint has been added to some properties in order to make the semantics consistent.
  • The StandardProfileL2 and StandardProfileL3 profiles have been amalgamated into a single StandardProfile.
  • NamedElement::clientDependency has been made derived.

This migration guide has been provided to assist consumers in the process of migrating to the new UML2 5.0 API. An XMI-based (de)serialization mechanism (described herein) has also been provided to automatically migrate resources based on the UML2 4.x schema to the new 5.0 schema.

The changes in UML2 5.0 can be broken into functional areas, relating to various aspects of the EMF-based UML implementation provided by the UML2 project. The following sections describe each of these areas in detail.

API

Incompatible changes in the UML2 API are primarily concerned with the UML metamodel and supporting model resources, but this release also includes an incompatible refactoring of some validation-related API.

EMF Validation Framework

In the 4.x releases, since Eclipse Juno, the org.eclipse.uml2.uml bundle has included implementations of certain EMF Validation Framework APIs to support validation of UML models using that API. This included an optional dependency on the org.eclipse.emf.validation bundle.

In the 5.0 release, the classes in the org.eclipse.uml2.uml.validation package and the consequent dependency metadata are moved into a new bundle, eponymously named. Any bundles that are using this API will have to add a dependency on the new org.eclipse.uml2.uml.validation bundle. Note that, if this dependency was previously expressed using Import-Package:, then no change will be needed as the API as such remains source and binary compatible; it is only moved to a new bundle. However, as these packages were not and are not individually versioned, such a dependency would have been difficult to manage.

UML Metamodel

TBD

Back to the top