diff options
author | Michael Valenta | 2003-09-05 15:33:22 +0000 |
---|---|---|
committer | Michael Valenta | 2003-09-05 15:33:22 +0000 |
commit | bc157e68ee93e19fb46b7c8b94105d8e26799aaa (patch) | |
tree | 4b8573adf3994c50f627e7d1c00bebf0834c8ea1 /tests | |
parent | 5c50d737e5cc5ab57cc3f5ad5b956ec823f56fcc (diff) | |
download | eclipse.platform.team-bc157e68ee93e19fb46b7c8b94105d8e26799aaa.tar.gz eclipse.platform.team-bc157e68ee93e19fb46b7c8b94105d8e26799aaa.tar.xz eclipse.platform.team-bc157e68ee93e19fb46b7c8b94105d8e26799aaa.zip |
Fixed Checkout to use a WorkspaceJob
Diffstat (limited to 'tests')
-rw-r--r-- | tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/HeadlessCVSRunnableContext.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/HeadlessCVSRunnableContext.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/HeadlessCVSRunnableContext.java index 6df0e2a1b..df1d0af68 100644 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/HeadlessCVSRunnableContext.java +++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/HeadlessCVSRunnableContext.java @@ -13,23 +13,40 @@ package org.eclipse.team.tests.ccvs.ui.unit; import java.lang.reflect.InvocationTargetException; import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.jobs.IJobChangeListener; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.swt.widgets.Shell; +import org.eclipse.team.internal.ccvs.ui.operations.CVSNonblockingRunnableContext; import org.eclipse.team.internal.ccvs.ui.operations.ICVSRunnableContext; public class HeadlessCVSRunnableContext implements ICVSRunnableContext { + private boolean background; + private IJobChangeListener listener; + + public HeadlessCVSRunnableContext() { + this(null); + } + + public HeadlessCVSRunnableContext(IJobChangeListener listener) { + this.listener = listener; + } + /* (non-Javadoc) * @see org.eclipse.team.internal.ccvs.ui.operations.ICVSRunnableContext#run(java.lang.String, org.eclipse.core.runtime.jobs.ISchedulingRule, org.eclipse.jface.operation.IRunnableWithProgress) */ public void run( String title, ISchedulingRule schedulingRule, - IRunnableWithProgress runnable) + boolean postponeBuild, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException { - runnable.run(new NullProgressMonitor()); + if (listener != null) { + new CVSNonblockingRunnableContext(listener).run("Headless Job", null, true, runnable); + } else { + runnable.run(new NullProgressMonitor()); + } } /* (non-Javadoc) |