migration - Cannot reduce size of RCP view when migrated to Eclipse 4 -
i'm working on migrating set of eclipse rcp applications 3.6 4.2. i'm struggling issue rcp perspectives view height cannot reduced below size (looks 10% window height). code works fine in eclipse 3.x , user can reduce view height dragging border.
however, in 4.x height of top view (button view) can reduced upto value. can this, please?
public class perspective implements iperspectivefactory { public static final string id = "im.rcptest2.fixedperspective"; public void createinitiallayout(ipagelayout layout) { string editorarea = layout.geteditorarea(); layout.seteditorareavisible(false); layout.addstandaloneview(buttonview.id, false, ipagelayout.top, 0.1f, editorarea); layout.addstandaloneview(view.id, false, ipagelayout.left, 0.25f, editorarea); ifolderlayout folder = layout.createfolder("messages", ipagelayout.top, 0.5f, editorarea); folder.addplaceholder(view2.id + ":*"); folder.addview(view2.id+":2"); folder.addview(view2.id+":3"); layout.getviewlayout(buttonview.id).setcloseable(false); layout.getviewlayout(view.id).setcloseable(false); } } public class buttonview extends viewpart { public buttonview() { } public static final string id = "im.rcptest2.buttonview"; //$non-nls-1$ private text text; /** * create contents of view part. * @param parent */ @override public void createpartcontrol(composite parent) { composite container = new composite(parent, swt.none); container.setbackground(swtresourcemanager.getcolor(swt.color_gray)); container.setlayout(new gridlayout(2, false)); text = new text(container, swt.border); text.setlayoutdata(new griddata(swt.fill, swt.top, true, false, 1, 1)); { button btnmybutton = new button(container, swt.none); btnmybutton.settext("mybutton"); } } @override public void setfocus() { // todo auto-generated method stub } }
this looks value
int minsashpercent = 10;
in org.eclipse.e4.ui.workbench.renderers.swt.sashlayout
there not seem way change value. thing write custom sash renderer class providing own renderer factory.
Comments
Post a Comment