use of org.eclipse.jface.internal.provisional.action.ICoolBarManager2 in project eclipse.platform.ui by eclipse-platform.
the class WorkbenchPage method resetToolBarLayout.
/**
*/
public void resetToolBarLayout() {
ICoolBarManager2 mgr = (ICoolBarManager2) legacyWindow.getCoolBarManager2();
mgr.resetItemOrder();
}
use of org.eclipse.jface.internal.provisional.action.ICoolBarManager2 in project eclipse.platform.ui by eclipse-platform.
the class EditorReference method disposeEditorActionBars.
public static void disposeEditorActionBars(EditorActionBars actionBars) {
actionBars.removeRef();
if (actionBars.getRef() <= 0) {
String type = actionBars.getEditorType();
Set<EditorActionBars> set = actionCache.get(type);
if (set != null) {
set.remove(actionBars);
}
// refresh the cool bar manager before disposing of a cool item
ICoolBarManager2 coolBar = (ICoolBarManager2) ((WorkbenchWindow) actionBars.getPage().getWorkbenchWindow()).getCoolBarManager2();
if (coolBar != null) {
coolBar.refresh();
}
actionBars.dispose();
}
}
use of org.eclipse.jface.internal.provisional.action.ICoolBarManager2 in project eclipse.platform.ui by eclipse-platform.
the class WorkbenchWindow method updateActionSets.
/**
* Update the visible action sets. This method is typically called from a page
* when the user changes the visible action sets within the prespective.
*/
public void updateActionSets() {
if (updateDisabled) {
return;
}
WorkbenchPage currentPage = (WorkbenchPage) getActivePage();
if (currentPage == null) {
getActionPresentation().clearActionSets();
} else {
ICoolBarManager2 coolBarManager = (ICoolBarManager2) getCoolBarManager2();
if (coolBarManager != null) {
coolBarManager.refresh();
}
getActionPresentation().setActionSets(currentPage.getActionSets());
}
fireActionSetsChanged();
updateActionBars();
// hide the launch menu if it is empty
String path = IWorkbenchActionConstants.M_WINDOW + IWorkbenchActionConstants.SEP + IWorkbenchActionConstants.M_LAUNCH;
IMenuManager manager = getMenuBarManager().findMenuUsingPath(path);
IContributionItem item = getMenuBarManager().findUsingPath(path);
if (manager == null || item == null) {
return;
}
item.setVisible(manager.getItems().length >= 2);
// there is a separator for the additions group thus >= 2
}
Aggregations