Bug 494946

Summary: ChangeAttributeOperation does not differentiate between attribute with null value and not contained attribute.
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF ZestAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: 0.2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: low-hanging fruit

Description Alexander Nyßen CLA 2016-05-30 13:46:58 EDT
When retrieving the old value of an attribute, ChangeAttributeOperation does not differentiate between an attribute that is not contained in the IAttributeStore (containsKey() == false) and one whose value is mapped to null. Therefore, it does not properly restore the initial situation upon undo. 

Further, ChangeAttributeValue always sets a property with null value, in case the given new value is null. Either we need a separate operation for the case that an attribute is to be removed, or this should be specifiable.
Comment 1 Alexander Nyßen CLA 2016-05-31 02:46:09 EDT
We should rename ChangeAttributeOperation into SetAttributeOperation and augment it with an UnsetAttributeOperation.