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

Bug 390172

Summary: Adding and deleting nodes and relationships without changing the layout of the other elements
Product: [Tools] GEF Reporter: Kristina Heckelmann <kheckelmann>
Component: GEF-Legacy ZestAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: steeg
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Kristina Heckelmann CLA 2012-09-24 04:39:06 EDT
With Zest 1.4 it was possible to change the graph structure, for example by adding a node, without applying the layout algorithm and changing the locations of all other nodes and relationships. 

That seems no longer possible since Zest 2.0. The refresh method of the GraphViewer seems to reset all locations to a default value and after that applies the LayoutAlgorithm. 

I think modifying a Graph in the viewer by adding or deleting elements is not a very rare use case. For example: adding a node and connect it to an existing node. Adding a node results in changing all locations of all other nodes. Because of that the user has to search for the existing node and the new created node before being able to connect them. In 1.4 the existing node's location did not change while the new node appeared in the left upper corner.

Is there any chance to get back that behavior in the near future?
Comment 1 Fabian Steeg CLA 2013-01-19 11:21:10 EST
Thanks for the report Kristina.

I have disabled dynamic layout by default and fixed an issue that enabled it when the viewer input changed. The main usage for dynamic layout seems to be using an ExpandCollapseManager, so dynamic layout is automatically enabled when Graph#setExpandCollapseManager is called. Another use case is the SpringLayoutProgress example, which I have updated to enable dynamic layout.

These changes and a corresponding test are available in master:

http://git.eclipse.org/c/gef/org.eclipse.gef4.git/commit/?id=9c7037571219ae215

If anybody thinks this makes no sense or could be solved in a better way please feel free to reopen (or if this doesn't fix your issue Kristina)...

Note that the Zest 2.0 code recently moved into the GEF4 repo and update site: 

http://wiki.eclipse.org/GEF/GEF4