MDT/UML2/New and Noteworthy/Luna
MDT UML2 New and Noteworthy items for the Kepler release.
For a complete list of the enhancements provided in the Luna release, see the Luna Project Plan.
This milestone was completed on November 15, 2013.
The UML2 package merge algorithm now injects documentation into the generated API to indicate the source package of classes, properties, and operations that originate in merge increments when the Capabilities merge option is enabled. For API elements defined in the receiving package of the merge, no such annotation is included in the documentation.
The Apply Stereotype action's dialog is enhanced to let the user specify an alternative resource in which to store the resultant stereotype application(s).
A new class org.eclipse.uml2.uml.validation.UMLTraversalStrategy implements an EMF Validation Framework "traversal strategy" that applications may register to let validation operations discover the instances of stereotypes that are attached to UML model elements, to validate them.
A new UML-to-Ecore conversion option, available in the EMF model importer and the profile definition action, lets the user determine how to handle properties that are untyped. In a UML model, a property that has no type can take any value; it is simply unconstrained. However, EMF cannot generate code for such a property, so now UML2 lets the user either substitute EObject type (the "Process" option), issue a warning ("Report"), or omit the property altogether ("Discard").
This milestone was completed on December 20, 2014.
The UML Editor menu sports a new Element → Expand Templates... action that reifies template bindings, replacing (in situ) the binding relationships in the bound element with elements merged from the templates. Constructs supported include
- template bindings for packages, classifiers, and operations
- bindings to multiple templates
- multiple bindings to the same template
- substitution of operands in name expressions (useful for disambiguating parameter substitutions from multiple bindings)
So, for example, a "deployment system" package that binds the same "system" package template twice, once for hardware components and once for software components. SoftwareSpec and HardwareSpec substitute for the ResourceKind in the template and the name of the Allocation class in the template is an expression in which the first segment is substituted by default with the string "Resource".
The template expansion algorithm is based on package merge. Most of the options are defaulted to values appropriate for template expansion, but the options for handling redundant generalizations and capabilities trace annotations are left to the user to decide.
The result of the expansion shows the substitution of parts of the name expressions for the SoftwareAllocation and HardwareAllocation which otherwise, using the default substitution, would both be named ResourceAllocation. Also, a trace annotation references all of the elements in the expanded package that were merged from the system template (just as in package merges).
UML-to-Ecore conversion (and, consequently, code generation) now supports transformation of OCL invariant constraints in EMF's non-API style for classes. These generate code only in the XyzValidator class, not as validation operations in the model API. This enhancement provides parity with constraint transformations for data types, which in EMF only support the non-API style of validation.
Generates this code:
The EMF.Edit item providers for the default attribute of the UML Property and Parameter metaclasses are improved to create values of more appropriate type than LiteralString where possible:
- for property or parameter of an Enumeration type, an InstanceValue referencing the EnumerationLiteral selected by the user from a pick-list
- for property or parameter of Boolean type, a LiteralBoolean with the value selected by the user from a true/false pick-list
- for property or parameter of Integer type, a LiteralInteger with the value entered by the user as text
- for property or parameter of UnlimitedNatural type, a LiteralUnlimitedNatural with the value entered by the user as text
- for property or parameter of Real type, a LiteralReal with the value entered by the user as text
- in other cases, a LiteralString is created
This milestone was completed on January 31, 2014.