Bug 283083 - Refactor Zest layouts
Summary: Refactor Zest layouts
Status: RESOLVED WORKSFORME
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 283179 283244
  Show dependency tree
 
Reported: 2009-07-09 18:04 EDT by Mateusz Matela CLA
Modified: 2014-07-16 08:56 EDT (History)
3 users (show)

See Also:


Attachments
Patch (353.35 KB, patch)
2009-07-10 14:53 EDT, Mateusz Matela CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Matela CLA 2009-07-09 18:04:56 EDT
Current layout related code in Zest is pretty messy. Let's replace it with a cleaner, refactored version. It will allow easier maintenance and also prepare Zest for adding tree related mechanisms like collapsing/expanding of nodes.

Preparing a patch...
Comment 1 Anthony Hunter CLA 2009-07-10 11:40:38 EDT
Something to consider is how these layouts in zest can be moved to draw2d to that other GEF clients can take advantage of them.
Comment 2 Ian Bull CLA 2009-07-10 12:12:07 EDT
This is a great idea Anthony.

The layouts have always been independent of Zest.  Actually, they have been independent of everything (they even have their own Point / Rectangle classes so they can be used with SWT or AWT).  

Mateusz, what do you think.  Do you think we could put an example together that demonstrates the feasibility of this?

Comment 3 Mateusz Matela CLA 2009-07-10 12:39:42 EDT
I'm not familiar with draw2d layout code, but I guess it shouldn't be a problem to prepare an adapter for Zest algorithms so that some of Zest layout functionality can be added to draw2d. It would be harder to completely integrate these two mechanisms because I'm going to add some advanced stuff to Zest for handling trees, which would probably cause some mess in draw2d.
Comment 4 Ian Bull CLA 2009-07-10 12:55:15 EDT
From the Draw2D / GEF side, the layouts really just need to return a set of locations for the nodes.  The TreeGraph stuff isn't really applicable (at this point).  We could probably do this by creating a layout context, and either creating proxy nodes for the NodeLayout or directly making the GEF entities implement NodeLayout.

I'm pretty sure the architecture supports this. We can work on an example once we get the initial contribution done.
Comment 5 Mateusz Matela CLA 2009-07-10 14:53:46 EDT
Created attachment 141328 [details]
Patch

The layout API has changed so some changes are required in zest.core. I'll provide these in a separate bug.
Comment 6 Alexander Nyßen CLA 2014-07-16 08:56:18 EDT
This is being worked on in the context of GEF4 Layout, as such resolving this as WORKSFORME for Zest 1.x.