|
|
Re: Eclipse Toolbar [message #1730009 is a reply to message #1720265] |
Wed, 20 April 2016 20:41 |
Bo Berney Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Same issue here. Did you ever find any workarounds? I've spent many hours attempting to workaround these issues.
One other issue on the main toolbar is that the "toolbar:org.eclipse.ui.trim.command2" locationURI is ignored when starting the application on a new or cleaned workspace. Have to run, close, then re-open to get my status widgets to display on the right side of the toolbar.
I did find an ugly workaround for the gaps in the toolbar. The items that were causing the gaps had the visibility set to true and the child element had visibility set to false. I'm sure there is a better way to do this, but works for me. After loading, I did the following:
MTrimBar topTrim = ((WorkbenchWindow) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow()).getTopTrim();
for (MTrimElement element : topTrim.getChildren()) {
if (element instanceof MToolBar) {
boolean any = false;
List<MToolBarElement> children = ((MToolBar) element).getChildren();
if (children != null && !children.isEmpty()) {
for (MToolBarElement child : children) {
if (child.isVisible()) {
any = true;
break;
}
}
}
if (!any) {
element.setVisible(false);
}
}
}
[Updated on: Wed, 20 April 2016 21:53] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02841 seconds