Community
Participate
Working Groups
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...
Something to consider is how these layouts in zest can be moved to draw2d to that other GEF clients can take advantage of them.
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?
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.
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.
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.
This is being worked on in the context of GEF4 Layout, as such resolving this as WORKSFORME for Zest 1.x.