use of org.eclipse.jface.action.IToolBarManager in project tdi-studio-se by Talend.
the class AbstractJvmPropertySection method deactivateSection.
/**
* Deactivates the section.
*/
protected void deactivateSection() {
isSectionActivated = false;
if (pageBook.isDisposed() || messagePage.isDisposed() || messageLabel.isDisposed()) {
return;
}
// remove tool bar actions
IToolBarManager toolBarManager = getToolBarManager();
if (toolBarManager != null) {
removeToolBarActions(toolBarManager);
toolBarManager.update(false);
updateActionBars();
}
// remove local menus
IMenuManager menuManager = getMenuManager();
if (menuManager != null) {
menuManager.remove(preferencesAction.getId());
removeLocalMenus(menuManager);
menuManager.update(false);
updateActionBars();
}
// clear status line
clearStatusLine();
}
use of org.eclipse.jface.action.IToolBarManager in project tdi-studio-se by Talend.
the class TalendPaletteHelper method updatePaletteActions.
private static void updatePaletteActions(IActionBars actionBars, IAction action, boolean isTalendEditor) {
IToolBarManager toolBarManager = actionBars.getToolBarManager();
IContributionItem cItem = toolBarManager.find(action.getClass().getCanonicalName());
if (cItem == null) {
if (isTalendEditor) {
toolBarManager.add(action);
}
} else {
if (!isTalendEditor) {
toolBarManager.remove(new ActionContributionItem(action));
}
}
}
Aggregations