diff options
author | Marc Khouzam | 2016-06-21 17:03:09 +0000 |
---|---|---|
committer | Marc Khouzam | 2016-09-07 19:26:43 +0000 |
commit | 999c2e97ccbc52b20f10febeb1daa492727019f0 (patch) | |
tree | 04874b5b2b510f24b74a41fa0cdc35a5086b1730 /debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleWorkbenchPart.java | |
parent | 0caa750ef0b08ebcc7159c41b09304499f967bee (diff) | |
download | org.eclipse.cdt-999c2e97ccbc52b20f10febeb1daa492727019f0.tar.gz org.eclipse.cdt-999c2e97ccbc52b20f10febeb1daa492727019f0.tar.xz org.eclipse.cdt-999c2e97ccbc52b20f10febeb1daa492727019f0.zip |
Bug 303808: Add dedicated debugger console view
Splitting out the GDB console into its own Debugger Console view.
The goal of this patch is to allow the user to easily keep the full GDB
console in focus, without having to pin it, as the pin requirement was
not very user-friendly. Furthermore, the user can also use the GDB
console while looking at the output of the program being debugged,
which couldn't not be done without a dedicated gdb console view.
This patch also resolves two issues we had with re-using the platform
console view, which were:
- pin didn't work
- clone didn't work
With this new Debugger console view, there is no pin and no clone.
Change-Id: Ia19132704a2f6618f35ffe47ebb4b8f0028dc9ab
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleWorkbenchPart.java')
-rw-r--r-- | debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleWorkbenchPart.java | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleWorkbenchPart.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleWorkbenchPart.java new file mode 100644 index 00000000000..5abfff5bbfc --- /dev/null +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleWorkbenchPart.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2016 Ericsson and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.cdt.debug.internal.ui.views.debuggerconsole; + +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.IPropertyListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.console.IConsole; + +/** + * Fake part to use as keys in page book for debugger console pages + */ +public class DebuggerConsoleWorkbenchPart implements IWorkbenchPart { + + private IConsole fConsole; + private IWorkbenchPartSite fSite; + + @Override + public boolean equals(Object obj) { + return (obj instanceof DebuggerConsoleWorkbenchPart) && + fConsole.equals(((DebuggerConsoleWorkbenchPart)obj).fConsole); + } + + @Override + public int hashCode() { + return fConsole.hashCode(); + } + + /** + * Constructs a part for the given console that binds to the given + * site + */ + public DebuggerConsoleWorkbenchPart(IConsole console, IWorkbenchPartSite site) { + fConsole = console; + fSite = site; + } + + @Override + public void addPropertyListener(IPropertyListener listener) { + } + + @Override + public void createPartControl(Composite parent) { + } + + @Override + public void dispose() { + } + + @Override + public IWorkbenchPartSite getSite() { + return fSite; + } + + @Override + public String getTitle() { + return ""; //$NON-NLS-1$ + } + + @Override + public Image getTitleImage() { + return null; + } + + @Override + public String getTitleToolTip() { + return ""; //$NON-NLS-1$ + } + + @Override + public void removePropertyListener(IPropertyListener listener) { + } + + @Override + public void setFocus() { + } + + @Override + public <T> T getAdapter(Class<T> adapter) { + return null; + } +} |