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 4.0 Migration Guide

< MDT‎ | UML2
Revision as of 00:05, 19 October 2011 by Kenn.Hussey.gmail.com (Talk | contribs)

Copyright © 2011 CEA

Summary

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

Kenn Hussey
Last Updated: October 18, 2011

Introduction

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.2 version of the UML specification, for which newer versions, namely 2.3 and 2.4 (and soon, 2.4.1), have been released by the Object Management Group (OMG) over the past couple of years. The source code for the UML2 project used to be stored in a CVS repository and its installable artifacts (update sites and downloads) were produced using an unsupported pre-Athena build system running on a machine that was at risk of being decommissioned in the near future.

The UML2 metamodel implementation has been enhanced so that it is compliant with the 2.4 and, implicitly, 2.3 version of the UML specification. This enhanced implementation has been delivered as a new version, 4.0, of the UML2 project, to be released as part of the Juno 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.4 was actually released by the OMG as part of a series of revisions, also known as the “2.4 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.4 and 2.3 specifications, described in more detail below, it was decided that the new version of UML2 would NOT be compatible with UML2 3.x. UML2 4.0 supersedes previous version(s) of the project (i.e., new major or minor versions of the 3.x stream will NOT be released) and is neither API contract nor binary compatible with UML2 3.x.

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

The changes in UML2 4.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

The UML2 project provides a Java API that is generated using a (customized version of) the code generation facility in EMF. In the past, this API has been generated from a source model produced by merging models of Infrastructure, Superstructure, and L3 compliance level of UML with custom extensions introduced by the UML2 project. As of UML 2.4, however, a reference model of the merged L3 compliance level of UML, serialized in UML format, has been provided along with the specification by the OMG. As a result, the API is now generated from a source model produced by merging this merged L3 reference model with custom extensions introduced by the UML2 project.

The following subsections describe the changes to the classifiers, properties, operations, and constraints in the revised UML specifications which affected the API provided by UML2. It is worth noting that a number of the utilities and unit tests provided by UML2 were also modified in response to changes in the API.

Classifiers

Classifiers in UML are represented as Java interfaces, implementation classes, and enumerations in the UML2 API. These types are generated using the (customized) EMF code generator, along with associated factory and utility methods.

The following table lists the classifiers that were removed by the revised specifications. Removals that had a nontrivial impact on API compatibility and/or migration of legacy resources are highlighted in italics.

Classifier Issue(s)
DestructionEvent 14629
ExecutionEvent 14629
ReceiveOperationEvent 14629
ReceiveSignalEvent 14629
SendOperationEvent 14629
SendSignalEvent 14629

The following table lists the classifiers that were modified by the revised specifications. Modifications that had a nontrivial impact on API compatibility and/or migration of legacy resources are highlighted in italics.

Classifier Change Issue(s)
ActivityGroup specializes NamedElement 13943
OccurrenceSpecification abstract 9820
Pin abstract 12565

The following table lists the classifiers that were added by the revised specifications. Additions that had a nontrivial impact on functionality provided by the UML2 project are highlighted in italics.

Classifier Issue(s)
DestructionOccurrenceSpecification 14629
LiteralReal 12583
Real 12583

Properties

Properties in UML are represented as Java fields with accessors (“getter” and “setter” methods) in the UML2 API. These members are generated using the (customized) EMF code generator and, in some cases (e.g., if a property is derived), implemented or customized by hand.

The following table lists the properties that were removed by the revised specifications. Removals that had a nontrivial impact on API compatibility and/or migration of legacy resources are highlighted in italics.

Property Issue(s)
BehavioredClassifier::ownedTrigger 14931
OccurrenceSpecification::event 14629
Profile::ownedStereotype 12833

The following table lists the properties that were modified by the revised specifications. Modifications that had a nontrivial impact on API compatibility and/or migration of legacy resources are highlighted in italics.

Property Change Issue(s)
AcceptEventAction::trigger subsets ownedElement 14926
Activity::structuredNode not derived 16232
ActivityEdge::inStructuredNode subsets owner 13718
ActivityNode::inStructuredNode subsets owner 13718
Behavior::isReentrant default is true 9873
Behavior::redefinedBehavior subsets redefinedClassifier
subsets redefinedElement
15265
Clause::test multiplicity is 1..* 8682
Component::provided OCL expression 13146
Component::required OCL expression 13146
ComponentRealization::abstraction subsets supplier, subsets source, subsets client 11008
ComponentRealization::realizingClassifier subsets client, subsets target 11008
ConditionalNode::result redefines structuredNodeOutput, subsets output 11646
ConnectableElement::end read only 15568
Connector::kind derived, read only 7364, 14115, 15568
Duration::expr subsets ownedElement 14926
EncapsulatedClassifier::ownedPort read only 15568
EnumerationLiteral::enumeration multiplicity is 1..1 14631
ExecutionOccurrenceSpecification::execution multiplicity is 0..2 14629
ExtensionEnd::lower derived, read only, multiplicity is 0..1 15568, 15762
InteractionUse::argument type is ValueSpecification, subsets ownedElement 10591, 14926
Interface::redefinedInterface subsets redefinedClassifier 14554
LinkAction::endData subsets ownedElement 14926
LinkEndData::qualifier subsets ownedElement 14926
LoopNode::loopVariableInput redefines structuredNodeInput, subsets input 11646
LoopNode::result redefines structuredNodeOutput, subsets output 11646
LoopNode::test multiplicity is 1..* 8682
Message::signature not derived, not read only 14629
OpaqueAction::body nonunique, ordered 10081
OpaqueAction::language ordered 10081
OpaqueBehavior::body nonunique, ordered 10081
OpaqueBehavior::language ordered 10081
OpaqueExpression::body nonunique, ordered 10081
OpaqueExpression::language ordered 10081
Operation::interface subsets namespace, subsets featuringClassifier 13991
Operation::isOrdered read only 15568
Operation::isUnique read only 15568
Operation::lower read only 15568
Operation::type read only 15568
Operation::upper read only 15568
Port::provided OCL expression 13080
Port::required OCL expression 13080
Property::owningAssociation subsets redefinitionContext 15526
Property::redefinedPort subsets redefinedProperty 10144
Reception::signal multiplicity is 1..1 12558
RedefinableTemplateSignature::classifier redefines template, subsets owner 11244
State::deferrableTrigger subsets ownedElement 14926
StateMachine::extendedStateMachine redefines redefinedBehavior, redefines redefinedElement 15669
Stereotype::icon subsets ownedElement 14926
Stereotype::profile read only 15568
StructuredActivityNode::edge subsets ownedElement 13718, 14926
StructuredActivityNode::node subsets ownedElement 13718, 14926
TimeEvent::when subsets ownedElement 14926
TimeExpression::expr subsets ownedElement 14926
Transition::trigger subsets ownedElement 14926
ValuePin::value subsets ownedElement 14926
ValueSpecificationAction::value subsets ownedElement 14926
Vertex::incoming read only 15568
Vertex::outgoing read only 15568
WriteStructuralFeatureAction::value multiplicity is 0..1 9870
WriteVariableAction::value multiplicity is 0..1 9870

The following table lists the properties that were added by the revised specifications. Additions that had a nontrivial impact on functionality provided by the UML2 project are highlighted in italics.

Property Issue(s)
Action::isLocallyReentrant 6111
Classifier::isFinalSpecialization 10515
EnumerationLiteral::classifier 14631
InteractionUse::returnValue 10591
InteractionUse::returnValueRecipient 10591
Package::ownedStereotype 12833, 15568
Package::URI 15370
Port::isConjugated 13080
Property::interface 14235
Property::isID 15369
StructuredActivityNode::structuredNodeInput 11646
StructuredActivityNode::structuredNodeOutput 11646

Operations

Constraints

Copyright © Eclipse Foundation, Inc. All Rights Reserved.