Disabling the Maximize/Minimize trim space in Eclipse RCP 4 -
in eclipse 3 , eclipse 4, editorsashcontainer
looks when has 1 editorstack
:
in eclipse 4, adds trim (which i've colored red) when there multiple editorstacks
, didn't in eclipse 3:
i understand we're in e4, there's no such thing editor
, editorstack
, , editorsashcontainer
, part
, partstack
, , partsashcontainer
. there different between "root" partsashcontainer
, "regular" partsashcontainer
, because "root" 1 has maximize/minimize buttons , trim:
my question this:
- what different between "root" , "regular"
partsashcontainer
(maybe 1 isn'tpartsashcontainer
?) - how disable behavior?
my custom rcp application has 1 "root" partsashcontainer
, , it's unsettling trim come , go. have mucked application.css
, , gone far forking org.eclipse.e4.ui.workbench.addons.swt
, i'm stuck.
welp, ain't pretty, found way. greg-449 crucial marea
hint.
you can set rendererfactoryuri
adding snippet product extension:
<property name="rendererfactoryuri" value="bundleclass://com.myplugin/package.to.myworkbenchrendererfactory"> </property>
if don't set it, eclipse uses this default.
if set renderer marea
regular mpartsashcontainer
's renderer, works.
here's code:
import org.eclipse.e4.ui.internal.workbench.swt.abstractpartrenderer; import org.eclipse.e4.ui.model.application.ui.muielement; import org.eclipse.e4.ui.model.application.ui.advanced.marea; import org.eclipse.e4.ui.workbench.renderers.swt.sashrenderer; import org.eclipse.e4.ui.workbench.renderers.swt.workbenchrendererfactory; public class myworkbenchrendererfactory extends workbenchrendererfactory { private sashrenderer arearenderer; @override public abstractpartrenderer getrenderer(muielement uielement, object parent) { if (uielement instanceof marea) { if (arearenderer == null) { arearenderer = new sashrenderer(); initrenderer(arearenderer); } return arearenderer; } else { return super.getrenderer(uielement, parent); } } }
of course, "minimize/maximize" buttons rendered strangely, disable them anyway, fixing part problem ;-).
Comments
Post a Comment