Skip to content

Commit 283f954

Browse files
EcljpseB0Tjukzi
authored andcommitted
ConsoleTests: do not wait for all Jobs
defines a Jobfamily CONSOLE_JOB_FAMILY and only wait for that to fix unrelated "AutoRegisterSchemeHandlersJob still running" error on MacOs during I-Build eclipse-platform/eclipse.platform.ui#2245
1 parent 3f34d1c commit 283f954

File tree

10 files changed

+70
-33
lines changed

10 files changed

+70
-33
lines changed

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.function.Predicate;
2727
import java.util.function.Supplier;
2828

29+
import org.eclipse.core.internal.jobs.JobManager;
2930
import org.eclipse.core.runtime.ILog;
3031
import org.eclipse.core.runtime.IStatus;
3132
import org.eclipse.core.runtime.Status;
@@ -177,13 +178,14 @@ public static boolean waitWhile(Supplier<Boolean> condition, long timeout) throw
177178
*
178179
* @param owner name of the caller which will be logged as prefix if the
179180
* wait times out
181+
* @param jobFamily the jobFamily to wait for
180182
* @param minTimeMs minimum wait time in milliseconds
181183
* @param maxTimeMs maximum wait time in milliseconds
182184
* @return true if the method timed out, false if all the jobs terminated
183185
* before the timeout
184186
*/
185-
public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs) {
186-
return waitForJobs(owner, minTimeMs, maxTimeMs, (Object[]) null);
187+
public static boolean waitForJobs(String owner, Object jobFamily, long minTimeMs, long maxTimeMs) {
188+
return waitForJobs(owner, jobFamily, minTimeMs, maxTimeMs, (Object[]) null);
187189
}
188190

189191
/**
@@ -202,11 +204,16 @@ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs)
202204
* @return true if the method timed out, false if all the jobs terminated before the timeout
203205
*/
204206
public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs, Object... excludedFamilies) {
207+
return waitForJobs(owner, null, minTimeMs, maxTimeMs, excludedFamilies);
208+
}
209+
210+
public static boolean waitForJobs(String owner, Object jobFamily, long minTimeMs, long maxTimeMs, Object... excludedFamilies) {
205211
if (maxTimeMs < minTimeMs) {
206212
throw new IllegalArgumentException("Max time is smaller as min time!");
207213
}
208-
final long start = System.currentTimeMillis();
209-
while (System.currentTimeMillis() - start < minTimeMs) {
214+
Job.getJobManager().wakeUp(jobFamily);
215+
final long start = System.nanoTime();
216+
while (System.nanoTime() - start < minTimeMs * 1_000_000) {
210217
processUIEvents();
211218
try {
212219
Thread.sleep(Math.min(10, minTimeMs));
@@ -215,7 +222,7 @@ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs,
215222
}
216223
}
217224
while (!Job.getJobManager().isIdle()) {
218-
List<Job> jobs = getRunningOrWaitingJobs(null, excludedFamilies);
225+
List<Job> jobs = getRunningOrWaitingJobs(jobFamily, excludedFamilies);
219226
if (jobs.isEmpty()) {
220227
// only uninteresting jobs running
221228
break;
@@ -229,7 +236,7 @@ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs,
229236
return true;
230237
}
231238

232-
if (System.currentTimeMillis() - start >= maxTimeMs) {
239+
if (System.nanoTime() - start >= maxTimeMs * 1_000_000) {
233240
dumpRunningOrWaitingJobs(owner, jobs);
234241
return true;
235242
}
@@ -239,15 +246,14 @@ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs,
239246
runningJobs.clear();
240247
return false;
241248
}
242-
243249
static Set<Job> runningJobs = new LinkedHashSet<>();
244250

245251
private static void dumpRunningOrWaitingJobs(String owner, List<Job> jobs) {
246-
String message = "Some job is still running or waiting to run: " + dumpRunningOrWaitingJobs(jobs);
252+
String message = "Some job is still running or waiting to run: " + getDump(jobs);
247253
log(IStatus.ERROR, owner, message, new RuntimeException(message));
248254
}
249255

250-
private static String dumpRunningOrWaitingJobs(List<Job> jobs) {
256+
private static String getDump(List<Job> jobs) {
251257
if (jobs.isEmpty()) {
252258
return "";
253259
}
@@ -258,6 +264,7 @@ private static String dumpRunningOrWaitingJobs(List<Job> jobs) {
258264
runningJobs.add(job);
259265
sb.append("\n'").append(job.toString()).append("'/");
260266
sb.append(job.getClass().getName());
267+
sb.append(":").append(JobManager.printState(job));
261268
Thread thread = job.getThread();
262269
if (thread != null) {
263270
ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().getThreadInfo(new long[] { thread.getId() }, true, true);

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleManagerTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.eclipse.ui.console.IConsole;
3838
import org.eclipse.ui.console.IConsoleManager;
3939
import org.eclipse.ui.console.IConsoleView;
40+
import org.eclipse.ui.internal.console.ConsoleManager;
4041
import org.eclipse.ui.part.IPageBookViewPage;
4142
import org.eclipse.ui.part.MessagePage;
4243
import org.junit.After;
@@ -85,7 +86,7 @@ public void setUp() throws Exception {
8586
firstConsole = new ConsoleMock(0);
8687
manager.addConsoles(new ConsoleMock[] { firstConsole });
8788
manager.showConsoleView(firstConsole);
88-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
89+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
8990
TestUtil.processUIEvents(100);
9091
ConsoleMock.allShownConsoles.set(0);
9192
}
@@ -118,7 +119,7 @@ public void testShowAllConsoles() throws Exception {
118119

119120
// Console manager starts a job with delay, let wait for him a bit
120121
System.out.println("Waiting on jobs now..."); //$NON-NLS-1$
121-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
122+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
122123

123124
// Give UI a chance to proceed pending console manager jobs
124125
System.out.println("Done with jobs, processing UI events again..."); //$NON-NLS-1$
@@ -161,7 +162,7 @@ private void showConsole(final ConsoleMock console) {
161162
latch.await(1, TimeUnit.MINUTES);
162163
System.out.println("Requesting to show: " + console); //$NON-NLS-1$
163164
manager.showConsoleView(console);
164-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
165+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
165166
} catch (InterruptedException e) {
166167
e.printStackTrace();
167168
Thread.interrupted();

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleTests.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.eclipse.ui.console.IOConsole;
4040
import org.eclipse.ui.console.IOConsoleOutputStream;
4141
import org.eclipse.ui.console.MessageConsole;
42+
import org.eclipse.ui.internal.console.ConsoleManager;
4243
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
4344
import org.junit.Test;
4445

@@ -55,21 +56,21 @@ public void testConsoleOutputStreamEncoding() throws IOException {
5556
MessageConsole console = new MessageConsole("Test Console", //$NON-NLS-1$
5657
IConsoleConstants.MESSAGE_CONSOLE_TYPE, null, StandardCharsets.UTF_8.name(), true);
5758
IDocument document = console.getDocument();
58-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
59+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
5960
assertEquals("Document should be empty", "", document.get()); //$NON-NLS-1$ //$NON-NLS-2$
6061
try (IOConsoleOutputStream outStream = console.newOutputStream()) {
6162
outStream.write(testStringBuffer, 0, 6);
6263
// half of ö (\u00f6) is written so we don't expect this char in
6364
// output but all previous chars can be decoded
64-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
65+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
6566
assertEquals("First 4 chars should be written", testString.substring(0, 4), document.get()); //$NON-NLS-1$
6667
outStream.write(testStringBuffer, 6, 6);
6768
// all remaining bytes are written so we expect the whole string
6869
// including the ö (\u00f6) which was at buffer boundary
69-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
70+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
7071
assertEquals("whole test string should be written", testString, document.get()); //$NON-NLS-1$
7172
}
72-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
73+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
7374
// after closing the stream, the document content should still be the
7475
// same
7576
assertEquals("closing the stream should not alter the document", testString, document.get()); //$NON-NLS-1$
@@ -83,15 +84,15 @@ public void testConsoleOutputStreamLastR() throws IOException {
8384
MessageConsole console = new MessageConsole("Test Console 2", //$NON-NLS-1$
8485
IConsoleConstants.MESSAGE_CONSOLE_TYPE, null, StandardCharsets.UTF_8.name(), true);
8586
IDocument document = console.getDocument();
86-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
87+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
8788
assertEquals("Document should be empty", "", document.get()); //$NON-NLS-1$ //$NON-NLS-2$
8889
try (IOConsoleOutputStream outStream = console.newOutputStream()) {
8990
outStream.write(testStringBuffer);
9091
// everything but pending \r should be written
91-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
92+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
9293
assertEquals("First char should be written", testString.substring(0, 1), document.get()); //$NON-NLS-1$
9394
}
94-
TestUtil.waitForJobs(name.getMethodName(), 200, 5000);
95+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 200, 5000);
9596
// after closing the stream, the document content should still be the
9697
// same
9798
assertEquals("closing the stream should write the pending \\r", testString, document.get()); //$NON-NLS-1$
@@ -182,7 +183,7 @@ public void testFindCommandsAreEnabledOnConsoleOpen() throws Exception {
182183
try {
183184
consoleManager.addConsoles(consoles);
184185
consoleManager.showConsoleView(console);
185-
TestUtil.waitForJobs(name.getMethodName(), 100, 3000);
186+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 100, 3000);
186187

187188
ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
188189
Command commandFindReplace = commandService.getCommand(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleFixedWidthTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package org.eclipse.debug.tests.console;
1515

1616
import org.eclipse.debug.tests.TestUtil;
17+
import org.eclipse.ui.internal.console.ConsoleManager;
1718

1819
/**
1920
* Same as {@link IOConsoleTests} but with fixed width console enabled.
@@ -29,7 +30,7 @@ protected IOConsoleTestUtil getTestUtil(String title) {
2930
c.getConsole().setConsoleWidth(3);
3031
c.setIgnoreFixedConsole(true);
3132
// console width is applied asynchronous
32-
TestUtil.waitForJobs(name.getMethodName(), 50, 1000);
33+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 50, 1000);
3334
return c;
3435
}
3536

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.List;
2727

2828
import org.eclipse.core.runtime.IStatus;
29+
import org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager;
2930
import org.eclipse.debug.tests.TestUtil;
3031
import org.eclipse.jface.text.BadLocationException;
3132
import org.eclipse.jface.text.IDocument;
@@ -41,6 +42,7 @@
4142
import org.eclipse.ui.console.IConsoleDocumentPartitioner;
4243
import org.eclipse.ui.console.IOConsole;
4344
import org.eclipse.ui.console.IOConsoleOutputStream;
45+
import org.eclipse.ui.internal.console.ConsoleManager;
4446

4547
/**
4648
* Utility to help testing input and output in {@link IOConsole}.
@@ -237,7 +239,7 @@ public IOConsoleTestUtil insert(String content) {
237239
// content the caret is updated
238240
setCaretOffset(e.start + content.length());
239241
}
240-
TestUtil.waitForJobs(name, 0, 1000);
242+
TestUtil.waitForJobs(name, ConsoleManager.CONSOLE_JOB_FAMILY, 0, 1000);
241243
return this;
242244
}
243245

@@ -288,7 +290,7 @@ public IOConsoleTestUtil insertTyping(String content) {
288290
textPanel.notifyListeners(SWT.KeyDown, e);
289291
textPanel.notifyListeners(SWT.KeyUp, e);
290292
}
291-
TestUtil.waitForJobs(name, 0, 1000);
293+
TestUtil.waitForJobs(name, ConsoleManager.CONSOLE_JOB_FAMILY, 0, 1000);
292294
return this;
293295
}
294296

@@ -693,7 +695,8 @@ public IOConsoleTestUtil verifyPartitions(final int offset, final int length, fi
693695
* @return this {@link IOConsoleTestUtil} to chain methods
694696
*/
695697
public IOConsoleTestUtil waitForScheduledJobs() {
696-
TestUtil.waitForJobs(name, 25, 5 * 2000);
698+
TestUtil.waitForJobs(name, ProcessConsoleManager.class, 25, 5 * 2000);
699+
TestUtil.waitForJobs(name, ConsoleManager.CONSOLE_JOB_FAMILY, 25, 5 * 2000);
697700
return this;
698701
}
699702

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
import org.eclipse.ui.console.IConsoleManager;
6969
import org.eclipse.ui.console.IOConsole;
7070
import org.eclipse.ui.console.IOConsoleOutputStream;
71+
import org.eclipse.ui.internal.console.ConsoleManager;
7172
import org.junit.After;
7273
import org.junit.Before;
7374
import org.junit.Test;
@@ -162,7 +163,7 @@ protected IOConsoleTestUtil getTestUtil(String title) {
162163
});
163164
final IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
164165
consoleManager.addConsoles(new IConsole[] { console });
165-
TestUtil.waitForJobs(name.getMethodName(), 25, 10000);
166+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 25, 10000);
166167
consoleManager.showConsoleView(console);
167168
@SuppressWarnings("restriction")
168169
final org.eclipse.ui.internal.console.IOConsolePage page = (org.eclipse.ui.internal.console.IOConsolePage) consoleView.getCurrentPage();

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleManagerTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ public void testProcessConsoleLifecycle() throws Exception {
7373
launch = process.getLaunch();
7474
launchManager.addLaunch(launch);
7575
// do not wait on input read job
76-
TestUtil.waitForJobs(name.getMethodName(), 0, 10000, ProcessConsole.class);
76+
TestUtil.waitForJobs(name.getMethodName(), ProcessConsoleManager.class, 0, 10000, ProcessConsole.class);
7777
assertThat(consoleManager.getConsoles()).as("console has been added").hasSize(1);
7878
} finally {
7979
mockProcess.destroy();
8080
}
8181

8282
if (launch != null) {
8383
launchManager.removeLaunch(launch);
84-
TestUtil.waitForJobs(name.getMethodName(), 0, 10000);
84+
TestUtil.waitForJobs(name.getMethodName(), ProcessConsoleManager.class, 0, 10000);
8585
assertThat(consoleManager.getConsoles()).as("console has been removed").isEmpty();
8686
}
8787
}
@@ -106,15 +106,15 @@ public void testBug546710_ConsoleCreationRaceCondition() throws Exception {
106106
setPreference(DebugUIPlugin.getDefault().getPreferenceStore(), IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES, true);
107107
// Stop the JobManager to reliable trigger the tested race
108108
// condition.
109-
TestUtil.waitForJobs(name.getMethodName(), 0, 10000);
109+
TestUtil.waitForJobs(name.getMethodName(), ProcessConsoleManager.class, 0, 10000);
110110
Job.getJobManager().suspend();
111111
launchManager.addLaunch(process1.getLaunch());
112112
launchManager.addLaunch(process2.getLaunch());
113113
} finally {
114114
Job.getJobManager().resume();
115115
}
116116

117-
TestUtil.waitForJobs(name.getMethodName(), 0, 10000);
117+
TestUtil.waitForJobs(name.getMethodName(), ProcessConsoleManager.class, 0, 10000);
118118
ProcessConsoleManager processConsoleManager = DebugUIPlugin.getDefault().getProcessConsoleManager();
119119
ILaunch[] launches = launchManager.getLaunches();
120120
Set<IConsole> openConsoles = new HashSet<>();
@@ -135,7 +135,7 @@ public void testBug546710_ConsoleCreationRaceCondition() throws Exception {
135135
assertThat(removeAction).matches(ConsoleRemoveAllTerminatedAction::isEnabled, "is enabled");
136136
}
137137
removeAction.run();
138-
TestUtil.waitForJobs(name.getMethodName(), 0, 10000);
138+
TestUtil.waitForJobs(name.getMethodName(), ProcessConsoleManager.class, 0, 10000);
139139
assertNull("First console not removed.", processConsoleManager.getConsole(process1));
140140
assertNull("Second console not removed.", processConsoleManager.getConsole(process1));
141141
}

debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import org.eclipse.debug.core.Launch;
5454
import org.eclipse.debug.core.model.IProcess;
5555
import org.eclipse.debug.internal.ui.DebugUIPlugin;
56+
import org.eclipse.debug.internal.ui.views.console.ProcessConsole;
5657
import org.eclipse.debug.tests.AbstractDebugTest;
5758
import org.eclipse.debug.tests.TestUtil;
5859
import org.eclipse.debug.tests.launching.LaunchConfigurationTests;
@@ -67,6 +68,7 @@
6768
import org.eclipse.ui.console.IConsoleManager;
6869
import org.eclipse.ui.console.IOConsole;
6970
import org.eclipse.ui.console.IOConsoleInputStream;
71+
import org.eclipse.ui.internal.console.ConsoleManager;
7072
import org.junit.After;
7173
import org.junit.Before;
7274
import org.junit.Test;
@@ -229,7 +231,7 @@ public void testInputReadJobCancel() throws Exception {
229231
final Class<?> jobFamily = org.eclipse.debug.internal.ui.views.console.ProcessConsole.class;
230232
assertThat(Job.getJobManager().find(jobFamily)).as("check input read job started").hasSizeGreaterThan(0);
231233
Job.getJobManager().cancel(jobFamily);
232-
TestUtil.waitForJobs(name.getMethodName(), 0, 1000);
234+
TestUtil.waitForJobs(name.getMethodName(), ProcessConsole.class, 0, 1000);
233235
assertThat(Job.getJobManager().find(jobFamily)).as("check input read job is canceled").isEmpty();
234236
} finally {
235237
console.destroy();
@@ -301,7 +303,7 @@ public void processTerminationTest(ILaunchConfiguration launchConfig, boolean te
301303
waitWhile(__ -> !terminationSignaled.get(), 10_000, __ -> "No console complete notification received.");
302304
} finally {
303305
consoleManager.removeConsoles(new IConsole[] { console });
304-
TestUtil.waitForJobs(name.getMethodName(), 0, 10000);
306+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 0, 10000);
305307
}
306308
}
307309

@@ -422,7 +424,7 @@ private IOConsole doConsoleOutputTest(byte[] testContent, Map<String, Object> la
422424
process.terminate();
423425
}
424426
consoleManager.removeConsoles(new IConsole[] { console });
425-
TestUtil.waitForJobs(name.getMethodName(), 0, 1000);
427+
TestUtil.waitForJobs(name.getMethodName(), ConsoleManager.CONSOLE_JOB_FAMILY, 0, 1000);
426428
}
427429
}
428430

debug/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
* @since 3.0
5858
*/
5959
public class ConsoleManager implements IConsoleManager {
60+
public static final String CONSOLE_JOB_FAMILY = "CONSOLE_JOB_FAMILY"; //$NON-NLS-1$
6061

6162
/**
6263
* Console listeners
@@ -93,6 +94,11 @@ public RepaintJob() {
9394
setSystem(true);
9495
}
9596

97+
@Override
98+
public boolean belongsTo(Object family) {
99+
return family == ConsoleManager.CONSOLE_JOB_FAMILY;
100+
}
101+
96102
void addConsole(IConsole console) {
97103
synchronized (list) {
98104
list.add(console);
@@ -260,6 +266,11 @@ private class ShowConsoleViewJob extends WorkbenchJob {
260266
setPriority(Job.SHORT);
261267
}
262268

269+
@Override
270+
public boolean belongsTo(Object family) {
271+
return family == ConsoleManager.CONSOLE_JOB_FAMILY;
272+
}
273+
263274
void addConsole(IConsole console) {
264275
synchronized (queue) {
265276
queue.add(console);
@@ -359,6 +370,11 @@ public void warnOfContentChange(final IConsole console) {
359370
if (!fWarnQueued) {
360371
fWarnQueued = true;
361372
Job job = new UIJob(ConsolePlugin.getStandardDisplay(), ConsoleMessages.ConsoleManager_consoleContentChangeJob) {
373+
@Override
374+
public boolean belongsTo(Object family) {
375+
return family == ConsoleManager.CONSOLE_JOB_FAMILY;
376+
}
377+
362378
@Override
363379
public IStatus runInUIThread(IProgressMonitor monitor) {
364380
IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();

0 commit comments

Comments
 (0)