1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

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
This commit is contained in:
Marc Khouzam 2016-10-26 16:27:50 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 896eba55c5
commit b0833f9e0c

View file

@ -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);
}