Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2016-10-28 19:57:22 +0000
committerMarc Khouzam2016-11-14 03:14:38 +0000
commitc2b4f189433b8a7309b58a4e7a3e5d9265df4915 (patch)
tree6c2dcd44f8d7f650abdbd98e7e952a3ffe848bf4
parent2cbf669a387743cdaf15c4715b5cd25abaeac9c0 (diff)
downloadorg.eclipse.cdt-c2b4f189433b8a7309b58a4e7a3e5d9265df4915.tar.gz
org.eclipse.cdt-c2b4f189433b8a7309b58a4e7a3e5d9265df4915.tar.xz
org.eclipse.cdt-c2b4f189433b8a7309b58a4e7a3e5d9265df4915.zip
Don't force the GDB console to be shown when created.
When a new launch is triggered and a new GDB console created, it was shown automatically. However, if there was a current debug session where the selection was a stack frame, our sticky policy (DefaultDsfSelectionPolicy) prevents the new session from being selected, so the new GDB console shown didn't match the selection in the DV. With this patch, when a new GDB console is created, we don't show it automatically, but let other logic figure out if it should be shown or not. Change-Id: If826677a6fb0f925f6b397a13f61fc75fc892748
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleView.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleView.java
index d5f316a7705..56184fb956c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleView.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleView.java
@@ -211,9 +211,14 @@ implements IConsoleView, IDebuggerConsoleView, IConsoleListener, IPropertyChange
DebuggerConsoleWorkbenchPart part = new DebuggerConsoleWorkbenchPart(registered, getSite());
fConsoleToPart.put(registered, part);
fPartToConsole.put(part, registered);
+ // Must call partActivated() to create the page
+ // However, this will also show the page, which is not
+ // what we want. Therefore, let's force the previous
+ // page to be shown again right after.
+ IDebuggerConsole previouslyShown = getCurrentConsole();
partActivated(part);
- if (console instanceof IDebuggerConsole) {
- display((IDebuggerConsole)console);
+ if (previouslyShown != null) {
+ display(previouslyShown);
}
break;
}

Back to the top