| Summary: | [EMF Compare UML] Delete an element with a stereotype create a polluting difference | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMFCompare | Reporter: | Arthur Daussy <arthur.daussy> | ||||
| Component: | Core | Assignee: | EMF Compare <emf.compare-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cedric.notot, laurent.goubet, vincent.lorenzo | ||||
| Version: | 1.3 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
This bug is linked with 361344. It is the same issue. The fix and explanations are in this last one (Bug 361344). Regards, Cedric Notot Arthur, the build I outlined in bug 361344, comment 3 should also contains the fix for this. Could you verify the fix from your side? Closing now |
Created attachment 205601 [details] Models to reproduce the bug When delete an element with a stereotype a UMLStereotypeApplicationRemoval diff is created. Which look like: Stereotype <Stereotype> Block has been unapplied on null. How to reproduce: 1. Create two model with one element stereotyped 2. Delete this element in the "left" model 3. Run comparison 4. See result. (See also models in attachment) My guess is that the problem come from UMLStereotypeApplicationRemovalFactory.handles(DiffElement) which should test that the left based element is still available. I have tried to correct with: public boolean handles(DiffElement input) { if (input instanceof ModelElementChangeRightTarget) { final EObject rightElement = ((ModelElementChangeRightTarget)input).getRightElement(); final Element rightBase = UMLUtil.getBaseElement(rightElement); if (rightBase != null) { final EObject leftBase = getEngine().getMatched(rightBase, MatchSide.LEFT); return leftBase != null; } } return false; } But there is still some problems. Regards,