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

Bug 508822

Summary: Graph builds should accept setters for attributes (in addition to keys).
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF GraphAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0.0   
Target Milestone: 5.0.0 (Oxygen) M4   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2016-12-07 08:15:00 EST
Up to now, attribute values for a to be constructed Node, Edge, or Graph can be created by invoking attr(String, Object) with a key value pair. We should allow to pass in a setter operation as well, so that for instance DotAttributes:setLabel could be passed in as a key.
Comment 1 Alexander Nyßen CLA 2016-12-07 09:17:34 EST
I pushed the following changes to origin/master:

- Added overloaded variants of attr() that accept a BiConsumer and a value to Node.Builder, Edge.Builder, and Graph.Builder.
- Changed internal data structure of attributes within builders to use a list of entries, so attributes are set in the order they are specified with the builder.
- Added a test case to GraphBuilderTests to check that overwrite works properly for Graph.Builder.

Resolving as fixed in 5.0.0 (Oxygen) M4