Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-04-28 10:01:27 -0400
committerAndrey Loskutov2019-04-28 12:52:42 -0400
commitf09f1e9f05795fb820e3c859273faae755ce94e2 (patch)
treefe50093a3a9c8c5f0e939fed6067f99c30d6af7f /org.eclipse.debug.ui/ui/org/eclipse
parent72f672fe7e6becae36c083ab3f9162f47476b128 (diff)
downloadeclipse.platform.debug-f09f1e9f05795fb820e3c859273faae755ce94e2.tar.gz
eclipse.platform.debug-f09f1e9f05795fb820e3c859273faae755ce94e2.tar.xz
eclipse.platform.debug-f09f1e9f05795fb820e3c859273faae755ce94e2.zip
Change-Id: I473f4fa1296cbbc823f6d2b6ad6827957816d64c Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
index fb73e6e04..45d3ac769 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -51,7 +51,7 @@ import com.ibm.icu.text.MessageFormat;
public class ProcessConsoleManager implements ILaunchListener {
/**
- * Crates console for given process
+ * Creates console for given process
*/
private final class ConsoleCreation extends Job {
private final ILaunch launch;
@@ -77,6 +77,14 @@ public class ProcessConsoleManager implements ILaunchListener {
// add new console to console manager.
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { pc });
+
+ // If a launch is removed the associated console is removed too. It can happen
+ // that the launch is removed even before the console could be created.
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=546710#c13
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ if (!launchManager.isRegistered(launch)) {
+ removeLaunch(launch);
+ }
return Status.OK_STATUS;
}

Back to the top