Java 代码:
WorkbenchWindow window = (WorkbenchWindow)PlatformUI.getWorkbench().getActiveWorkbenchWindow();
PerspectiveBarManager barManager = window.getPerspectiveBar();
CoolBarManager manager = window.getCoolBarManager();
//manager.removeAll();
MenuManager manager2 = window.getMenuBarManager();
//manager2.removeAll();
IContributionItem[] contributionItems = manager2.getItems();
for(IContributionItem item : contributionItems) {
System.out.println(item.getId());
}
manager2.remove("help");
manager.update(true);
manager2.update(true);
--转自
该贴由koei123转至本版2015-7-26 22:50:10