Search in sources :

Example 1 with CloseStapConsoleAction

use of org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.CloseStapConsoleAction 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);
}
Also used : ScriptConsole(org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole) SaveLogAction(org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.SaveLogAction) IToolBarManager(org.eclipse.jface.action.IToolBarManager) StopScriptAction(org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.StopScriptAction) CloseStapConsoleAction(org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.CloseStapConsoleAction)

Aggregations

IToolBarManager (org.eclipse.jface.action.IToolBarManager)1 CloseStapConsoleAction (org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.CloseStapConsoleAction)1 SaveLogAction (org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.SaveLogAction)1 StopScriptAction (org.eclipse.linuxtools.internal.systemtap.ui.consolelog.actions.StopScriptAction)1 ScriptConsole (org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole)1