Skip to content

UML 2.5.1 Support#132

Open
juergen-albert wants to merge 3 commits intomasterfrom
UML_2.5.1
Open

UML 2.5.1 Support#132
juergen-albert wants to merge 3 commits intomasterfrom
UML_2.5.1

Conversation

@juergen-albert
Copy link
Copy Markdown
Contributor

Adds support for UML 2.5.1 namespace (http://www.omg.org/spec/UML/20161101) to Eclipse UML2.

Fixes #101

Background

UML 2.5.1 (published December 2017) is a maintenance release containing editorial corrections and errata fixes. The metamodel is unchanged from UML 2.5.0 - only the namespace identifier changed from 20131001 to 20161101.

Note: Metamodel changes like UMLR-685 (remove Extension::isRequired) and UMLR-696 (remove RedefinableElement::isLeaf default) are targeted for UML 2.6, not 2.5.1.

What This Enables

Signed-off-by: Juergen Albert <j.albert@data-in-motion.biz>
Implement UML 2.5.1 metamodel changes for Vertex/State redefinition
  hierarchy as specified in UMLR-685.

  Metamodel changes (UML.ecore):
  - Vertex now extends RedefinableElement
  - Add Vertex.redefinedVertex property (subsets redefinedElement)
  - Add Vertex.redefinitionContext (redefines RedefinableElement)
  - State.redefinedState is now derived from redefinedVertex
  - State no longer directly extends RedefinableElement (inherits via
Vertex)

  Implementation (StateImpl.java):
  - Implement basicGetRedefinedState() to derive from redefinedVertex

Signed-off-by: Juergen Albert <j.albert@data-in-motion.biz>
  - Register UML 5.1.0 namespace (http://www.eclipse.org/uml2/5.1.0/UML)
  - Register OMG UML 2.5.1 namespace
(http://www.omg.org/spec/UML/20161101)
  - Resource factory and handler for UML 2.5.1 models
@juergen-albert
Copy link
Copy Markdown
Contributor Author

@ewillink I implemented #138 and #135 here. Can you please do a review?

I'm not sure about the changes in the codestyle, but this is what happend after I regenerated the model.

@ewillink
Copy link
Copy Markdown
Contributor

The codestyle needs fixing. The existing code like most projects uses tab indentation. AFAIAA only EMF uses double-space indentation, which always causes me grief. For the UML2 project files we need to stick with tab indentation.

After model generation I often find it necessary to:
a) In Problem View Select "import" problem and apply a quick fix to remove all unused imports.
b) In Staging View open each 'changed' file and do a dummy add end of line space, save.

  • this uses the Java save actions to trim blank lines and redundant casts and fix overrides.
  • for me only a couple of files are regularly adrift.
    For the OCL and QVTd projects model generation is arbitrated by an MWE2 script that invokes /org.eclipse.ocl.build/src/org/eclipse/ocl/build/utilities/ConvertToUnixLineEndings.java for source directories to fix up a variety of bad files.

I suggest finding where your double-space indentation comes from. Then we can probably ensure that the OOMPH setup gets it right. Once indentation is fixed we can hopefully compromise on brace usage and placement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add UML 2.5.1 support

2 participants