1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 09:16:02 +02:00

Bug 303808: Make it easier to extend Debugger Console pages

To perform actions on the GdbFullCliConsole, it is important to provide
access to the terminal widget.  This patch adds the new method
GdbFullCliConsolePage#getTerminalViewControl() to give access to the
ITerminalViewControl.

Also, to be consistent with the platform's ConsoleView, this patch also
adds the same groups in the toolbar.  Namely
IConsoleConstants.LAUNCH_GROUP and IConsoleConstants.OUTPUT_GROUP.
Extenders can use these groups to add their buttons to the Debugger
Console view.

Change-Id: I217ce54ada63796de776c6b4cb6b925c3feb7eea
This commit is contained in:
Marc Khouzam 2016-12-21 21:58:20 -05:00
parent 576d41fe69
commit d780df14c2
2 changed files with 9 additions and 0 deletions

View file

@ -21,6 +21,7 @@ import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
@ -32,6 +33,7 @@ import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleConstants;
import org.eclipse.ui.console.IConsoleListener;
import org.eclipse.ui.console.IConsolePageParticipant;
import org.eclipse.ui.console.IConsoleView;
@ -141,6 +143,9 @@ public class DebuggerConsoleView extends PageBookView
}
protected void configureToolBar(IToolBarManager mgr) {
mgr.add(new Separator(IConsoleConstants.LAUNCH_GROUP));
mgr.add(new Separator(IConsoleConstants.OUTPUT_GROUP));
mgr.add(new Separator("fixedGroup")); //$NON-NLS-1$
mgr.add(fDisplayConsoleAction);
}

View file

@ -287,4 +287,8 @@ public class GdbFullCliConsolePage extends Page implements IDebugContextListener
fTerminalControl.setBufferLineLimit(bufferLines);
}
}
public ITerminalViewControl getTerminalViewControl() {
return fTerminalControl;
}
}