DESCRIPTION

Bug 482024 - ExpandableComposite layout issues

Bug 368861 - ExpandableComposite failed to compute right wrapped client
size

- removed all special cases in regards to guessing about wrapping on
client controls and let control calculate its own size based on hints
- refactored code that same calculations are used when calculating size
and doing layout, otherwise its duplicated in two spots leading to some
nasty issues
- better heuristics when calculating proportions of text client and text
label controls
- fixed bug in SizeCache where it won't let control calculate size with
given hint because it calculates wrong minimumWidth. Removed lots of
special cases in SizeCache leaving so it actually cache the size rather
then guess it. Added lots of tests for it

testing done:
- run existing junits and wrote bunch more,
- current code coverage for ExpandableComposite is 72%
- manual tested bunch of flag combinations
- test running eclipse sdk and using PDE editors that use forms heavily
(plugin manifest and target definition editor) seems to be ok
(linux ubuntu and windows 8)

Change-Id: I8fdeb70d39d3c762a297f476356257ee91ae666d
Signed-off-by: Ishaan Salas xxx@xxx.xxx


COMMENTS

author: Kelly Potter
date: 2016-07-19 04:59:33.000000000

Uploaded patch set 32.

-------------------------------------
author: Brenden Conley
date: 2016-07-19 04:59:39.000000000

Patch Set 32:

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

-------------------------------------
author: Brenden Conley
date: 2016-07-19 05:24:53.000000000

Patch Set 32: Verified+1

Build Successful 

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

-------------------------------------
author: Zaid Mosley
date: 2016-09-23 13:43:32.000000000

Patch Set 32:

What is the status here Elena and Stefan? Can this be merged?

-------------------------------------
author: Kelly Potter
date: 2016-09-23 13:48:04.000000000

Patch Set 32: Code-Review-1

No, Lars. This patch is very good, but itcreates a regression in the form-based editors (the scrollable region is ending up much too narrow rather than creating scrollbars) and I haven't had time to investigate it yet.

I'm planning this as on of my top priorities once the index is merged, but the index work has been dragging on a lot longer than I'd hoped.

-------------------------------------
author: Julian Foster
date: 2016-09-23 14:11:40.000000000

Patch Set 32:

Stefan do you have example? Maybe I can look at it my spare time.
Is this on its own with your patch together?

-------------------------------------
author: Kelly Potter
date: 2016-09-23 14:18:17.000000000

Patch Set 32:

Thanks, Elena. That would be very helpful.

You need both patches together - neither one is expected to work independently.

You can see the problem in the MANIFEST.MF editor. Open Eclipse, reduce the horizontal size of the window, and observe that the text wraps rather than creating a horizontal scrollbar.

I believe this is because we're not computing (or using) the minimum sizes in ILayoutExtension properly.

I'd suggest looking at these editors in the new PDE layout inspector tool. I wrote that tool specifically to help investigate this bug, so it should tell you what you need. If it's missing something, please add whatever you need to the inspector tool since this bug is *the* use-case for it. (I suspect we may want to update the inspector and add the output of the various ILayoutException methods.)

-------------------------------------
author: Zaid Mosley
date: 2017-01-11 18:47:36.000000000

Patch Set 33: Patch Set 32 was rebased

-------------------------------------
author: Gerrit Code Review
date: 2017-05-04 20:04:27.000000000

Change has been successfully merged into the git repository by Kelly Potter

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