How can we hide the tool bar entries in eclipse from plugin as shown in the image.
In the tool bar how can we hide only the perspective as shown in figure.
this helped me in hiding perspective toolbar entries.
IWorkbenchWindow window = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (window instanceof WorkbenchWindow) {
MTrimBar topTrim = ((WorkbenchWindow) window).getTopTrim();
for (MTrimElement element : topTrim.getChildren()) {
if ("PerspectiveSwitcher".equals(element.getElementId())) {
element.setVisible(false);
break;
}
}