Bug 487253 - Refactor layout adoption in GEF4 Zest.FX.
Summary: Refactor layout adoption in GEF4 Zest.FX.
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF Zest (show other bugs)
Version: 0.2.0   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: 4.0.0 (Neon) M6   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 440098 487081
  Show dependency tree
 
Reported: 2016-02-04 11:34 EST by Alexander Nyßen CLA
Modified: 2016-02-05 10:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nyßen CLA 2016-02-04 11:34:29 EST
As a prerequisite for bug #487081 (using Graphviz executable for layouting in DOT.UI) and #440098 (enable using ELK for layouting in Zest), we should the layout adoption within Zest.FX as follows:

We should ensure that the visualization and interaction within Zest is not dependent on the layout interfaces (or attributes defined therein), but only on Zest attributes. In the context of DOT.UI (in which the layout information in the Graph could already be provided through the Graphviz executable, we would need to remove all GEF4 Layout dependencies and only rely on the Graph-adoption alone). In the context of ELK, this would allow us to properly convert between the layout info of ELK (instead of our own) and the Graph layout data. In detail, the refactoring has to comprise:

1) We have to define Zest layout properties that can be used to specify position and size of nodes as well as routing of edges. The Zest content parts should listen to changes of these properties alone for refreshing their visuals, and the transaction policies should only update these properties (so that the graph model could also be stored persistet).

As Graphviz uses control points to describe the positioning of edges and we may use waypoints in other scenarios, we should simple provide "points" for edges and leave the concrete interpretation to the connection router (ZestProperties.CONNECTION_ROUTER). 

2) We need to ensure that the attributes of the layout adapters and the graph model elements are no longer bidirectionally bound, but that instead the layout information attributes are bidirectionally updated/converted upon changes. The layout algorithms should rely on the Layout properties only, the visualization and transactions in zest should only relay on the Zest attributes.
Comment 1 Matthias Wienand CLA 2016-02-05 10:16:48 EST
I pushed the following changes to master:

 - Add node-position, node-size, and edge-way-points properties to ZestProperties.
 - Respect node-position and node-size when refreshing NodeContentPart.
 - Respect edge-way-points when refreshing EdgeContentPart.
 - Chain model change operations when translating/resizing nodes.
 - Add property sheet integration to Zest Graph Example (for testing purposes).
 - Prevent unnecessary refresh of edges.
 - Remove bidirectional content binding from GraphLayoutContext.

So, the refactoring is completed, therfore, I resolve this ticket as fixed for 4.0.0 M6.