Community
Participate
Working Groups
Hi, PartSashContainer Part(id=part1, containerData=10) contains a menu composite Part(id=part2, containerData=90) The part1 displays a menu like this icon1 title1 icon2 title2 icon3 title3 I try to change size of the parts by code to show only icons: part1 = partService.findPart("part1"); //inject is ok and part1 not null part2 = partService.findPart("part2"); // part2 not null so it's ok part1.setContainerData("5"); part1.setContainerData("95"); and changes ... are ignored. Is there a solution to do this by code ? Thx
Hi, thanks for your bug report. What build of Eclipse 4 are you using?
(In reply to comment #1) > Hi, thanks for your bug report. What build of Eclipse 4 are you using? Eclipse 4.1
At a guess the place where you're setting the containerData to "95" should be against part2 correct ? If so then changes of this type should indeed be respected so that part1 would only occupy 5% of the space. It's possible that we have code to limit the minimum size though (I remember fixing a defect regarding the Debug view's 'breadcrumb' move involving this). Note that this won't have any effect on the menu's presentation though, it would only affect the size of the area occupied in the PSC by the two parts...
(In reply to comment #3) > At a guess the place where you're setting the containerData to "95" should be > against part2 correct ? > > If so then changes of this type should indeed be respected so that part1 would > only occupy 5% of the space. It's possible that we have code to limit the > minimum size though (I remember fixing a defect regarding the Debug view's > 'breadcrumb' move involving this). > > Note that this won't have any effect on the menu's presentation though, it > would only affect the size of the area occupied in the PSC by the two parts... Yes, part2.setContainerData("95") And my custom menu is a composite of push buttons for example. If i put values 5 and 95 in application model and run application, the part size changes and i only see icons in my part1. So, why i can't do this by code? Is there something to call after init container data to refresh Part size?
This is almost certainly due to the value of the constant 'minSashPercent' in the SashLayout class. This was put in specifically to prevent sash areas from being sized to zero. If this is true then I suspect that even when you set the values in the model any subsequent attempt to drag the sash will result to it 'snapping' to 10%... Not sure what the right fix is here...we really don't want folks to be able to make stacks too small.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.