Bug 352468 - SpaceTreeLayoutAlgorithm is hard to extend
Summary: SpaceTreeLayoutAlgorithm is hard to extend
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: 3.7   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 10:56 EDT by DS CLA
Modified: 2011-07-20 11:04 EDT (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 DS CLA 2011-07-19 10:56:29 EDT
So, for a project we're working on, we needed to extend SpaceTreeLayoutAlgorithm so that it wouldn't break if the tree to be built would be much larger than the graph it's built in and we also needed the algorithm to calculate the trees optimal size before laying all the nodes out. For this we needed to change the following methods: 
*moveNodeForward
*moveNodeBackward
*getAvailableSpace
*maximizeExpansion from the inner class SpaceTreeExpandCollapseManager

But it's all fairly impossible to do with all those private inner classes. 
So, what I'm asking is that could all this be a little more open to other classes and packages?
Comment 1 Fabian Steeg CLA 2011-07-20 11:04:16 EDT
This sounds like your changes would make a lot of sense for other users too. Perhaps it would be an option to add them to SpaceTreeLayoutAlgorithm itself. Would be great if you could attach a patch with your fixes.

Regarding making things public I'm reluctant in general, because once we release that API, we can't change it in the future. And for fixing bugs, it would be ideal to fix them directly, instead of creating subclasses with fixes.