Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2005-12-14 14:59:13 -0500
committerDarin Wright2005-12-14 14:59:13 -0500
commit8b377c8203a4054eebd2bb3740bf40296b63d3d8 (patch)
tree342e8fe0bd24a1804bfaa41d0fa3f1fccd066a44 /org.eclipse.ui.console
parent0dfffd9a41161c743931c935d78534c713d13fb4 (diff)
downloadeclipse.platform.debug-8b377c8203a4054eebd2bb3740bf40296b63d3d8.tar.gz
eclipse.platform.debug-8b377c8203a4054eebd2bb3740bf40296b63d3d8.tar.xz
eclipse.platform.debug-8b377c8203a4054eebd2bb3740bf40296b63d3d8.zip
Bug 108568 - Debug console test failure
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java8
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java7
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java11
3 files changed, 24 insertions, 2 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
index 8142582ce..f4bd56d47 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
@@ -389,7 +389,13 @@ public abstract class TextConsole extends AbstractConsole {
/**
* Returns a scheduling rule which can be used to prevent jobs from running
* while this console's pattern matcher is active.
- *
+ * <p>
+ * Although this scheduling rule prevents jobs from running at the same time as
+ * pattern matching jobs for this console, it does not enforce any ordering of jobs.
+ * Since 3.2, pattern matching jobs belong to the job family identified by the console
+ * object that matching is occurring on. To ensure a job runs after all scheduled pattern
+ * matching is complete, clients must join on this console's job family.
+ * </p>
* @return a scheduling rule which can be used to prevent jobs from running
* while this console's pattern matcher is active
*/
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
index 79565e7c1..beaa94c9b 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
@@ -46,7 +46,6 @@ public class ConsolePatternMatcher implements IDocumentListener {
public ConsolePatternMatcher(TextConsole console) {
fConsole = console;
- fMatchJob.setRule(fConsole.getSchedulingRule());
}
private class MatchJob extends Job {
@@ -164,6 +163,12 @@ public class ConsolePatternMatcher implements IDocumentListener {
return Status.OK_STATUS;
}
+
+ public boolean belongsTo(Object family) {
+ return family == fConsole;
+ }
+
+
}
private class CompiledPatternMatchListener {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
index f65337856..bb3d868d8 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
@@ -17,7 +17,10 @@ import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentEvent;
@@ -608,6 +611,14 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
* @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
*/
public IStatus runInUIThread(IProgressMonitor monitor) {
+ IJobManager jobManager = Platform.getJobManager();
+ try {
+ jobManager.join(console, monitor);
+ } catch (OperationCanceledException e1) {
+ return Status.CANCEL_STATUS;
+ } catch (InterruptedException e1) {
+ return Status.CANCEL_STATUS;
+ }
if (document == null) {
return Status.OK_STATUS;
}

Back to the top