Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2010-05-03 15:59:38 -0400
committerCurtis Windatt2010-05-03 15:59:38 -0400
commit898af1b7329c1237c1b73f7b810c03c9a5522112 (patch)
treede0eb860e321a111eb62f236d30b6ac0034918ce
parent7a0f1115df3abe090133ff320e2fb8a6e928fa48 (diff)
downloadeclipse.platform.debug-898af1b7329c1237c1b73f7b810c03c9a5522112.tar.gz
eclipse.platform.debug-898af1b7329c1237c1b73f7b810c03c9a5522112.tar.xz
eclipse.platform.debug-898af1b7329c1237c1b73f7b810c03c9a5522112.zip
Bug 309527: Device is disposed in ProcessConsole and ConsoleManager
https://bugs.eclipse.org/bugs/show_bug.cgi?id=309527
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java12
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java2
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties1
3 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
index b036c00f6..aea898a2f 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
@@ -43,6 +43,7 @@ import org.eclipse.ui.console.IConsolePageParticipant;
import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.console.IPatternMatchListener;
import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.progress.WorkbenchJob;
/**
@@ -356,8 +357,8 @@ public class ConsoleManager implements IConsoleManager {
public void warnOfContentChange(final IConsole console) {
if (!fWarnQueued) {
fWarnQueued = true;
- ConsolePlugin.getStandardDisplay().asyncExec(new Runnable(){
- public void run() {
+ Job job = new UIJob(ConsolePlugin.getStandardDisplay(), ConsoleMessages.ConsoleManager_consoleContentChangeJob) {
+ public IStatus runInUIThread(IProgressMonitor monitor) {
IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page= window.getActivePage();
@@ -369,8 +370,11 @@ public class ConsoleManager implements IConsoleManager {
}
}
fWarnQueued = false;
- }
- });
+ return Status.OK_STATUS;
+ }
+ };
+ job.setSystem(true);
+ job.schedule();
}
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
index eaf17b16b..79e8f73d8 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
@@ -22,6 +22,8 @@ public class ConsoleMessages extends NLS {
public static String ConsoleManager_0;
+ public static String ConsoleManager_consoleContentChangeJob;
+
public static String ConsoleView_0;
public static String PinConsoleAction_0;
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
index 3d835a439..ec2bea121 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
@@ -15,6 +15,7 @@ ConsoleDropDownAction_0=Select Console
ConsoleDropDownAction_1=Display Selected Console
ConsoleManager_0=An exception occurred during console notification
+ConsoleManager_consoleContentChangeJob=Console content change
ConsoleView_0=No consoles to display at this time.

Back to the top