Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 443840

Summary: Anchored shapes are not relocated when their anchorage is relocated in the GEF4 MVC example.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M2   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2014-09-11 10:57:07 EDT
The dot shapes of the GEF logo in the GEF4 MVC example are anchored to the corresponding letter shapes, respectively. This relation is visualized by a dashed line from the dot shape to the letter shape if the dot shape is selected. When moving the letter shape, the dot shape should move along as this is the behavior you would expect from anchored elements, for example, a connection label should move along with its connection, too.
Comment 1 Matthias Wienand CLA 2014-09-11 11:25:02 EDT
I implemented the proposed behavior by relocating the anchored shape when the 'link' anchorage undergoes visual changes (relative to the anchored). This relocation on visual changes of the anchorage is disabled if the anchored shape is currently resized/relocated itself, for example, when anchorage and anchored are selected and moved together.

The code is published on the master branch, therefore I change the status to RESOLVED, FIXED for target milestone 3.10.0M2.
Comment 2 Matthias Wienand CLA 2014-09-11 11:46:26 EDT
I have to re-open this bug, because the implicit dot shape relocations are not undoable properly, yet.
Comment 3 Matthias Wienand CLA 2014-09-11 11:59:02 EDT
I fixed the undo behavior by only locally executing the ResizeRelocateOperation for the anchored in response to a visual change of its anchorage. That way, the anchored is kept in-sync with the anchorage, but does not contribute an operation to the current undo context. When the anchorage ResizeRelocateOperation is "undone", this will lead to a visual change and keep the anchored (again) in-sync.