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

Bug 439705

Summary: Transactional policies should not duplicate information of the corresponding operation.
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: Matthias Wienand <matthias.wienand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Matthias Wienand CLA 2014-07-16 08:34:08 EDT
An IPolicy which implements ITransactional (and therefore builds an Operation which can be executed in an undo-context) should not duplicate information of the corresponding Operation. For example, the FXChangeWayPointsOperation stores a list of old way points and a list of new way points. The same two lists are stored in the FXBendPolicy which creates an FXChangeWayPointsOperation to perform its work. The Policy can simply delegate set/get of such fields to its Operation.
Comment 1 Alexander Nyßen CLA 2014-08-05 10:38:24 EDT
It seems some of these issues have already been addressed. Matthias, could you investigate this and comment here?
Comment 2 Matthias Wienand CLA 2014-08-05 14:27:50 EDT
No, these issues are not addressed, yet:

 1) FXBendPolicy: fields 'connection', 'oldLinks', and 'newLinks' should be managed by the operation.
 2) FXResizeRelocatePolicy: a new operation is constructed on each drag, but one operation could be created in the beginning, and changed on drag.
Comment 3 Matthias Wienand CLA 2014-09-10 04:18:06 EDT
By now, both policies (FXBendPolicy, FXResizeRelocatePolicy) use the fields of their corresponding operation. Therefore, I change the status to RESOLVED, FIXED.
Comment 4 Matthias Wienand CLA 2014-09-10 04:19:46 EDT
I forgot to actually change the status ;-)