| Summary: | Behavior break between 2.2 and 2.3 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] GMF-Tooling | Reporter: | Aurelien Pupier <apupier> | ||||
| Component: | Core | Assignee: | gmf.generation-inbox <gmf.generation-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ahunter.eclipse, borlander, englundGiant, info, ser, v.caselli, vincenzo.caselli, vs2 | ||||
| Version: | 2.3 | ||||||
| Target Milestone: | 3.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Aurelien Pupier
Created attachment 173208 [details]
patch
It seems that add a call to super at the end of the method do the trick.
I don't know exactly why.
The Xpand template file flagged in your patch is actually in the GMF Tooling. The history of this file is here: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmp/org.eclipse.gmf.tooling/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt?root=Modeling_Project It would seem that this is a new template in GMF 2.3.0, not sure what GMF 2.2.0 had. [GMF Restructure] Bug 319140 : product GMF and component Generation was the original product and component for this bug I have the same problem on not customized editor (forum thread: http://www.eclipse.org/forums/index.php?t=msg&th=174461&start=0&S=8aaafecd03ef5ca9bf02a82bf2ca3e6d). Adding super.refreshSemantic() at the end of *CompartmentCanonicalEditPolicy.refreshSemantic() solves the problem but probably isn't perfect. The funny thing is that duplication occurs then DnD from A to B and from B to A, but adding super.refreshSemantic() to only A's or B's compartment is enough to fix. I can also confirm I've got this bug. GMF 2.3, the diagram mapping is recursive and diagram is clean generated (not customised). After I drag an element from canvas to a compartment and drop it, a diplicate ghost view is created. If then I drag the original back the ghost disappears, though if ghost is dragged, another ghost is created with first one remaining in compartment. The issue as far as I can tell is only between different container types. If an element is dragged from one container to another of same type, the behaviour is correct. Adding a super.refreshSemantic() also solved the problem. Besides, this must be added to all containers' canonical policies, as if added to only one, the ghosts appear in others. Also, if an element comes from canvas (not modified) to say container X (with this mod) and back to canvas it doesn't create a ghost, as if it keeps a history of its original creation location, as opposed to element originally from X. Another bug's behaviour is with cut & paste. If element is cut and pasted (even within the same container), instead of expected element a strange Generic Element is created with view overlaid by (x) sign. When this is saved the underlying domain element is gone. Adding call to super does not help. Since GMF 3.0 org.eclipse.gmf.tooling.runtime.edit.policies.reparent.CreationEditPolicyWithCustomReparent which is attached to all suitable containers is expected to solve this problem. |