Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2002-04-11 01:54:22 +0000
committerDarin Wright2002-04-11 01:54:22 +0000
commit98923e2cd8d96fb753613b063402369d38f035b4 (patch)
tree7d12b4a0e3afe41cc176721f286b90d82bf7b25e
parent92475913a0bbc78693c7033f64b2a5cdf6be2c28 (diff)
downloadeclipse.platform.debug-98923e2cd8d96fb753613b063402369d38f035b4.tar.gz
eclipse.platform.debug-98923e2cd8d96fb753613b063402369d38f035b4.tar.xz
eclipse.platform.debug-98923e2cd8d96fb753613b063402369d38f035b4.zip
bug 13173
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java38
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ConsoleView.java1
2 files changed, 16 insertions, 23 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index acb748f40..3cc45fcf4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -621,6 +621,19 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
* @see ILaunchListener#launchChanged(ILaunch)
*/
public void launchChanged(final ILaunch launch) {
+
+ IProcess newProcess= null;
+ IDebugTarget target= launch.getDebugTarget();
+ if (target != null) {
+ newProcess= target.getProcess();
+ } else {
+ IProcess[] processes= launch.getProcesses();
+ if (processes.length > 0) {
+ newProcess= processes[processes.length - 1];
+ }
+ }
+ setCurrentProcess(newProcess);
+
getStandardDisplay().syncExec(new Runnable () {
public void run() {
IProcess[] processes= launch.getProcesses();
@@ -633,6 +646,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
}
}
});
+
}
/**
@@ -642,29 +656,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
*/
public void launchAdded(final ILaunch launch) {
updateHistories(launch);
-
- getStandardDisplay().syncExec(new Runnable () {
- public void run() {
- IProcess[] processes= launch.getProcesses();
- for (int i= 0; i < processes.length; i++) {
- ConsoleDocument doc= new ConsoleDocument(processes[i]);
- doc.startReading();
- setConsoleDocument(processes[i], doc);
- }
- }
- });
-
- IProcess newProcess= null;
- IDebugTarget target= launch.getDebugTarget();
- if (target != null) {
- newProcess= target.getProcess();
- } else {
- IProcess[] processes= launch.getProcesses();
- if (processes.length > 0) {
- newProcess= processes[processes.length - 1];
- }
- }
- setCurrentProcess(newProcess);
+ launchChanged(launch);
}
protected void updateFavorites(ILaunchConfiguration config) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ConsoleView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ConsoleView.java
index 1cc73c5d6..5a14bbe13 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ConsoleView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ConsoleView.java
@@ -367,6 +367,7 @@ public class ConsoleView extends AbstractDebugEventHandlerView implements IDocum
* @see ILaunchListener#launchChanged(ILaunch)
*/
public void launchChanged(ILaunch launch) {
+ launchAdded(launch);
}
/**

Back to the top