DESCRIPTION

Bug 361731 - Set size constraints on children of PartSashContainer

Change-Id: I4c7ca0a9765f73d0c9123a4eab9042b79a774d65
Signed-off-by: Arturo Copeland xxx@xxx.xxx

COMMENTS

author: Arturo Copeland
date: 2014-09-12 14:56:23.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2014-09-12 14:56:29.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/2994/

-------------------------------------
author: Arturo Copeland
date: 2014-09-12 15:01:00.000000000

Patch Set 8:

This version uses persisted state (and converts container data to persisted state on load)

A temporary value is stashed into transient data an used until the part is disposed, then it is stored back to persisted state

All known classes have been converted to use the new mechanism.

I am open to discussing whether or not to use a single object vs multiple ones in transient map.

-------------------------------------
author: Brenden Conley
date: 2014-09-12 15:09:14.000000000

Patch Set 8: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/2994/ : SUCCESS

-------------------------------------
author: Zaid Mosley
date: 2014-09-13 10:43:45.000000000

Patch Set 8:

(2 comments)

Partial feedback, I need to review in detail but wanted to give my first impression. From at first look the design feels a bit complex. I think PartSizeInfo is basically a Map with several conversion routines. I think the conversion should be done in one central place, e.g., SashLayout and as transient or persisted state is already a map, this additional data structure might not be necessary. Also it seems to spread through a lot of places in the application which I think give a solution the feeling of being complex.

For example I think if a part is dragged, it is OK to clean its layout data. If I drag a part into a container I don't expect that the container adjust to the element, I expect that the element adjust to the container.

Line:4134, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java -> I need to have a more detailed look but I would avoid using PartSizeInfo throughout the application, i.e.g in WorkbenchPage. I suggest to use simple data types.

Line:31, bundles/org.eclipse.e4.ui.workLeon Ochoach/src/org/eclipse/e4/ui/internal/workbench/PartSizeInfo.java -> This seems to store the data and provide functionality for conversion. I think we should separate this. For storing the data a map should be sufficient.

-------------------------------------
author: Arturo Copeland
date: 2014-09-13 13:28:04.000000000

Patch Set 8:

PartSizeInfo is only used where ContainerData was already used.  I don't see how this make it 'more' complex'.  It was already complex.

I also don't see why having a utility class that is not dependent on SWT, contains constants used by the rest of the system, and handles non renderer specific calculations should be moved into a specific render class.

It doesn't matter to me if PartSizeInfo has any members at all.  It can go directly to the maps;  That fact that I can change that implementation now, in one place, is exactly why I think it make sense to have it as a separate class.

-------------------------------------
author: Arturo Copeland
date: 2014-09-13 13:30:23.000000000

Patch Set 8:

>>I expect that the element adjust to the container.

This did not change.  The only difference is that when a part is dragged to a new container, I the resize mode is keep.

-------------------------------------
author: Arturo Copeland
date: 2014-09-13 21:06:22.000000000

Patch Set 8:

I spend 3 days trying to figure out why this was not working with the DND addon when minimizing a stack other then the first child of a PartSash.  It turns out the DND addon does not work when PartStacks have duplicate IDS.

-------------------------------------
