Minimum and Maximum view size in Eclipse 4 [message #1057891] |
Thu, 09 May 2013 15:15 |
Joel Becker Messages: 14 Registered: December 2012 |
Junior Member |
|
|
Hi,
Previous to e4 you could give a ViewPart a min and max size by implementing ISizeProvider. Now in e4 you don't provide your own ViewPart impl, so you can't make it implement ISizeProvider. How do you set a min/max size for a view in e4?
I did try implementing ISizeProvider in the class referenced by my PartDescriptor's Class URI, but the methods are not called.
Thanks,
Joel
[Updated on: Thu, 09 May 2013 20:14] Report message to a moderator
|
|
|
|
Re: Minimum and Maximum view size in Eclipse 4 [message #1063884 is a reply to message #1063798] |
Fri, 14 June 2013 17:36 |
Joel Becker Messages: 14 Registered: December 2012 |
Junior Member |
|
|
Unfortunately not. I spent about 6 hours trying various solutions, including hacks like reverting the size after the user attempts to re-size it beyond the min or max. Our team decided it wasn't worth spending any more time on.
[edit] I'll include my notes from my ticket:
Quote:
none of the (documented) E4 CSS attributes address control sizes.
Also tried adding a Control listener to listen for resizes and set the size, however this results in incorrect layout. It's like I need a "Sash" object to move the sash bar, but haven't been able to get one.
Also, I found how to dig the SashLayout out of the control hierarchy, but SashLayout does not allow external modification (no methods for changing size).
Also tried changing the MPartStack Container Data upon each resize, to re-set the container weight. That causes weird behavior: you can drag the sash to resize wherever you want to, then when you're done it pops back to the size I set in the code.
Also tried adding a mouse-move listener to the composite containing the sash, and restrained mouse cursor movement when the width was not within the min/max. Very clumsy and never got it working right.
[Updated on: Fri, 14 June 2013 17:38] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04524 seconds