| Summary: | Deleting a navigable association produces a property in source class | ||
|---|---|---|---|
| Product: | [Modeling] GMF-Tooling | Reporter: | Christian Waniek <chris.waniek> |
| Component: | Samples | Assignee: | Dummy mdt uml2 tools inbox <mdt-uml2tools-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 320241 | ||
| Bug Blocks: | |||
added dependency to bug #320241 in Eclipse UML2 project I fixed this by introducing a new AssoicationDeleteCommand as custom source in the class diagram plugin. |
Build Identifier: I created a class diagram with two classes and a navigable association between them. The according xmi looks as folows. <packagedElement xmi:type="uml:Class" xmi:id="_-JGPUJMrEd-Mc6E_TY_68w" name="Class"> <ownedAttribute xmi:id="__zCopJMrEd-Mc6E_TY_68w" name="dst" type="_-gVqoJMrEd-Mc6E_TY_68w" association="__zCooJMrEd-Mc6E_TY_68w"> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="__zCoppMrEd-Mc6E_TY_68w" value="1"/> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="__zCopZMrEd-Mc6E_TY_68w" value="1"/> </ownedAttribute> </packagedElement> <packagedElement xmi:type="uml:Class" xmi:id="_-gVqoJMrEd-Mc6E_TY_68w" name="Class1"/> <packagedElement xmi:type="uml:Association" xmi:id="__zCooJMrEd-Mc6E_TY_68w" memberEnd="__zCooZMrEd-Mc6E_TY_68w __zCopJMrEd-Mc6E_TY_68w"> <ownedEnd xmi:id="__zCooZMrEd-Mc6E_TY_68w" name="src" type="_-JGPUJMrEd-Mc6E_TY_68w" association="__zCooJMrEd-Mc6E_TY_68w"> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="__zCoo5MrEd-Mc6E_TY_68w" value="1"/> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="__zCoopMrEd-Mc6E_TY_68w" value="1"/> </ownedEnd> </packagedElement> Deleting the association leeds to the following: <packagedElement xmi:type="uml:Class" xmi:id="_-JGPUJMrEd-Mc6E_TY_68w" name="Class"> <ownedAttribute xmi:id="__zCopJMrEd-Mc6E_TY_68w" name="dst" type="_-gVqoJMrEd-Mc6E_TY_68w"> <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="__zCoppMrEd-Mc6E_TY_68w" value="1"/> <lowerValue xmi:type="uml:LiteralInteger" xmi:id="__zCopZMrEd-Mc6E_TY_68w" value="1"/> </ownedAttribute> </packagedElement> <packagedElement xmi:type="uml:Class" xmi:id="_-gVqoJMrEd-Mc6E_TY_68w" name="Class1"/> As you can see the ownedAttribute still remains in the source class. It is not deleted as one would expect. This is a bug in the Eclipse UML2 project: bug #320241 So if this bug in the UML2 project is fixed this should be checked again. Maybe there are some things to adapt, depending on the solution. So far there is an easy workaraund: 1. After havinmg deleted the navigable association close the class diagram. 2. Open the class diagram again 3. Now you see the property which has survived deletiing hte association 4. Delete the Property and save Reproducible: Always