Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-12-16 07:11:04 +0000
committerTobias Schwarz2014-12-16 07:11:04 +0000
commitd1b3a98d8f5983b49e62559e1365732b09f33785 (patch)
tree35adbbc6b6b50d8678af549417598ae8e844864b
parent76137cb1cd62256e8fa078063a92f1480fcc8a71 (diff)
downloadorg.eclipse.tcf-d1b3a98d8f5983b49e62559e1365732b09f33785.tar.gz
org.eclipse.tcf-d1b3a98d8f5983b49e62559e1365732b09f33785.tar.xz
org.eclipse.tcf-d1b3a98d8f5983b49e62559e1365732b09f33785.zip
SM: fix scheduleStepperJob blocks when progress monitor is given
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
index 464ce11b6..cd558b7e7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
@@ -39,7 +39,7 @@ public final class StepperHelper {
return stepperOperationService;
}
- public static final void scheduleStepperJob(Object context, String operation, IStepperOperationService service, IPropertiesContainer data, ICallback callback, IProgressMonitor monitor) {
+ public static final void scheduleStepperJob(Object context, String operation, IStepperOperationService service, IPropertiesContainer data, ICallback callback, final IProgressMonitor monitor) {
Assert.isNotNull(service);
Assert.isNotNull(data);
@@ -58,11 +58,17 @@ public final class StepperHelper {
}
if (stepGroupId != null && stepContext != null) {
- StepperJob job = new StepperJob(name != null ? name : "", stepContext, data, stepGroupId, operation, isCancelable, monitor == null); //$NON-NLS-1$
+ final StepperJob job = new StepperJob(name != null ? name : "", stepContext, data, stepGroupId, operation, isCancelable, monitor == null); //$NON-NLS-1$
job.setJobCallback(callback);
if (monitor != null) {
- job.run(monitor);
+ Thread runner = new Thread(name) {
+ @Override
+ public void run() {
+ job.run(monitor);
+ }
+ };
+ runner.start();
}
else {
job.schedule();

Back to the top