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 eclipse.platform.text by eclipse.
the class AbstractTemplatesPage method fillToolbar.
/**
* Fill the toolbar.
*
* @param actionBars the action bars
*/
private void fillToolbar(IActionBars actionBars) {
IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.add(fInsertAction);
toolBarManager.add(fAddAction);
toolBarManager.add(fEditAction);
toolBarManager.add(fRemoveAction);
toolBarManager.add(new Separator());
toolBarManager.add(fLinkWithEditorAction);
toolBarManager.add(fCollapseAllAction);
}
use of org.eclipse.jface.action.IToolBarManager in project linuxtools by eclipse.
the class RpmConsolePageParticipant method init.
@Override
public void init(IPageBookViewPage page, IConsole console) {
if (!(console instanceof RpmConsole)) {
return;
}
IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
StopBuildAction stopBuildAction = new StopBuildAction((RpmConsole) console);
manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, stopBuildAction);
CloseConsoleAction closeConsoleAction = new CloseConsoleAction((RpmConsole) console);
manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeConsoleAction);
}
use of org.eclipse.jface.action.IToolBarManager in project linuxtools by eclipse.
the class CallgraphView method createPartControl.
/**
* This is a callback that will allow us to create the viewer and
* initialize it.
*/
@Override
public void createPartControl(Composite parent) {
if (masterComposite != null) {
masterComposite.dispose();
}
masterComposite = parent;
GridLayout layout = new GridLayout(2, false);
layout.horizontalSpacing = 0;
GridData gd = new GridData(100, 100);
parent.setLayout(layout);
parent.setLayoutData(gd);
// LOAD ALL ACTIONS
createActions();
// MENU FOR SYSTEMTAP BUTTONS
IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
// MENU FOR SYSTEMTAP GRAPH OPTIONS
IMenuManager menu = getViewSite().getActionBars().getMenuManager();
// ADD OPTIONS TO THE GRAPH MENU
addFileMenu();
saveCurDot = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.getString("CallgraphView.SaveViewAsDot")) {
@Override
public void run() {
writeToDot(g.getCollapseMode(), g.nodeMap.keySet());
}
};
saveDot = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.getString("CallgraphView.SaveAllUncollapsedAsDot")) {
@Override
public void run() {
writeToDot(false, g.nodeDataMap.keySet());
}
};
saveColDot = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.getString("CallgraphView.SaveAllCollapsedAsDot")) {
@Override
public void run() {
writeToDot(true, g.nodeDataMap.keySet());
}
};
saveText = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.getString("CallgraphView.SaveCollapsedAsASCII")) {
@Override
public void run() {
saveTextAction();
}
};
// $NON-NLS-1$
IMenuManager saveMenu = new MenuManager(Messages.getString("CallgraphView.SaveMenu"));
file.add(saveMenu);
saveMenu.add(saveCurDot);
saveMenu.add(saveColDot);
saveMenu.add(saveText);
saveMenu.add(saveDot);
// $NON-NLS-1$
IMenuManager view = new MenuManager(Messages.getString("CallgraphView.ViewMenu"));
// $NON-NLS-1$
IMenuManager animation = new MenuManager(Messages.getString("CallgraphView.AnimationMenu"));
// $NON-NLS-1$
IMenuManager markers = new MenuManager(Messages.getString("CallgraphView.Markers"));
// $NON-NLS-1$
IMenuManager gotoMenu = new MenuManager(Messages.getString("CallgraphView.GoTo"));
menu.add(view);
menu.add(gotoMenu);
addHelpMenu();
view.add(viewTreeview);
view.add(viewRadialview);
view.add(viewAggregateview);
view.add(viewLevelview);
view.add(getViewRefresh());
view.add(modeCollapsedNodes);
view.add(limits);
view.add(animation);
gotoMenu.add(play);
gotoMenu.add(gotoPrevious);
gotoMenu.add(gotoNext);
gotoMenu.add(gotoLast);
gotoMenu.add(markers);
addKillButton();
mgr.add(play);
mgr.add(viewRadialview);
mgr.add(viewTreeview);
mgr.add(viewLevelview);
mgr.add(viewAggregateview);
mgr.add(modeCollapsedNodes);
markers.add(markersNext);
markers.add(markersPrevious);
animation.add(animationSlow);
animation.add(animationFast);
setGraphOptions(false);
}
use of org.eclipse.jface.action.IToolBarManager in project linuxtools by eclipse.
the class ScriptConsolePageParticipant method init.
@Override
public void init(IPageBookViewPage page, IConsole iConsole) {
if (!(iConsole instanceof ScriptConsole)) {
return;
}
fPage = page;
fConsole = (ScriptConsole) iConsole;
fView = (IConsoleView) fPage.getSite().getPage().findView(IConsoleConstants.ID_CONSOLE_VIEW);
StopScriptAction stopScriptAction = new StopScriptAction(fConsole);
CloseStapConsoleAction closeConsoleAction = new CloseStapConsoleAction(fConsole);
SaveLogAction saveLogAction = new SaveLogAction(fConsole);
// contribute to toolbar
IToolBarManager manager = fPage.getSite().getActionBars().getToolBarManager();
manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, stopScriptAction);
manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, closeConsoleAction);
manager.appendToGroup(IConsoleConstants.OUTPUT_GROUP, saveLogAction);
// TODO if {@link ModifyParsingAction} is restored, it is to be used here,
// in the same way stopScriptAction and saveLogAction are used.
DebugUITools.getDebugContextManager().getContextService(fPage.getSite().getWorkbenchWindow()).addDebugContextListener(this);
}
Aggregations