From b0833f9e0c50e3180473c80d87b05a443a866225 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 26 Oct 2016 16:27:50 -0400 Subject: [PATCH] Fix DebuggerConsoleManager#showConsoleView() not showing the console According to the javadoc of IDebuggerConsoleManager.showConsoleView(IDebuggerConsole), the specified console should be made visible when this method is called. Our implementation was not doing that. The PageSwitcher used in DebuggerConsoleView is making use of that call and was not working properly. One can verify this by using the "Next Page" key binding to change console pages. It works in the platform console but did not in the Debugger Console. This patch fixes it. Change-Id: I0caa94c85e5c9dbbd94d80081c7b4691c17d9582 --- .../ui/views/debuggerconsole/DebuggerConsoleManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleManager.java index ca17bc087a2..5d178dbc185 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleManager.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/debuggerconsole/DebuggerConsoleManager.java @@ -102,7 +102,8 @@ public class DebuggerConsoleManager implements IDebuggerConsoleManager { @Override public IStatus runInUIThread(IProgressMonitor monitor) { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - if (window != null && fConsole != null) { + IConsole c = fConsole; + if (window != null && c != null) { IWorkbenchPage page = window.getActivePage(); if (page != null) { boolean consoleFound = false; @@ -113,6 +114,7 @@ public class DebuggerConsoleManager implements IDebuggerConsoleManager { if (consoleVisible) { consoleFound = true; page.bringToTop(consoleView); + consoleView.display(c); } } @@ -123,6 +125,7 @@ public class DebuggerConsoleManager implements IDebuggerConsoleManager { null, IWorkbenchPage.VIEW_CREATE); page.bringToTop(consoleView); + consoleView.display(c); } catch (PartInitException e) { CDebugUIPlugin.log(e); }