去掉eclipse上的菜单

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);

你可能感兴趣的:(java,eclipse)