@Override protected void configureToolBar(IToolBarManager mgr) { super.configureToolBar(mgr); fStdOut = new ShowStandardOutAction(); fStdErr = new ShowStandardErrorAction(); mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fStdOut); mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fStdErr); }
/** * Constructs an action to toggle console auto activation preferences */ public ShowStandardErrorAction() { super(ConsoleMessages.ShowStandardErrorAction_0); setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowWhenStderrChangesAction"); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SHOW_WHEN_STDERR_CHANGES_ACTION); setImageDescriptor(DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STANDARD_ERR)); }
@Override public void init(IPageBookViewPage page, IConsole console) { fPage = page; fConsole = (ProcessConsole) console; fRemoveTerminated = new ConsoleRemoveLaunchAction(fConsole.getProcess().getLaunch()); fRemoveAllTerminated = new ConsoleRemoveAllTerminatedAction(); fTerminate = new ConsoleTerminateAction(page.getSite().getWorkbenchWindow(), fConsole); fStdOut = new ShowStandardOutAction(); fStdErr = new ShowStandardErrorAction(); fView = (IConsoleView) fPage.getSite().getPage().findView(IConsoleConstants.ID_CONSOLE_VIEW); DebugPlugin.getDefault().addDebugEventListener(this); DebugUITools.getDebugContextManager().getContextService(fPage.getSite().getWorkbenchWindow()).addDebugContextListener(this); // contribute to toolbar IActionBars actionBars = fPage.getSite().getActionBars(); configureToolBar(actionBars.getToolBarManager()); // create handler and submissions for EOF fEOFHandler = new EOFHandler(); }