diff options
author | Tobias Schwarz | 2013-01-22 15:04:49 +0000 |
---|---|---|
committer | Tobias Schwarz | 2013-01-22 15:05:16 +0000 |
commit | fa420c8f0168019f5a8d368cd7d5522c1e95980c (patch) | |
tree | c4e4dc76f99c9cb6c9f8a0039e3c0260f665c53e /target_explorer/plugins/org.eclipse.tcf.te.runtime/src | |
parent | 8ca82c5a611422e5dfc80fab45427eecc67fd06b (diff) | |
download | org.eclipse.tcf-fa420c8f0168019f5a8d368cd7d5522c1e95980c.tar.gz org.eclipse.tcf-fa420c8f0168019f5a8d368cd7d5522c1e95980c.tar.xz org.eclipse.tcf-fa420c8f0168019f5a8d368cd7d5522c1e95980c.zip |
TE: fix callback isDone() issue
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime/src')
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java index c47311394..edeb6fd49 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java @@ -157,18 +157,15 @@ public class Callback extends PropertiesContainer implements ICallback { return; } - status = checkStatusIntegrity(status); + setProperty(PROPERTY_IS_DONE, null); + setProperty(PROPERTY_STATUS, checkStatusIntegrity(status)); - setProperty(PROPERTY_IS_DONE, true); - setProperty(PROPERTY_STATUS, status); + internalDone(caller, status); - ICallback parentCallback = (ICallback) getProperty(PROPERTY_PARENT_CALLBACK); - if (parentCallback != null && parentCallback.isDone()) { - CoreBundleActivator.getTraceHandler().trace("WARNING: parent callback called twice!!", 1, this); //$NON-NLS-1$ + if (getProperty(PROPERTY_IS_DONE) == null) { + setProperty(PROPERTY_IS_DONE, true); } - internalDone(caller, status); - if (isDone()) { if (getProperty(PROPERTY_PROGRESS_MONITOR) instanceof IProgressMonitor) { IProgressMonitor progress = ((IProgressMonitor) getProperty(PROPERTY_PROGRESS_MONITOR)); @@ -182,14 +179,19 @@ public class Callback extends PropertiesContainer implements ICallback { } } - parentCallback = (ICallback) getProperty(PROPERTY_PARENT_CALLBACK); - if (parentCallback != null && !parentCallback.isDone()) { - copyProperties(this, parentCallback); - if (!ProgressHelper.isCancelOrError(this, + ICallback parentCallback = (ICallback) getProperty(PROPERTY_PARENT_CALLBACK); + if (parentCallback != null) { + if (parentCallback.isDone()) { + CoreBundleActivator.getTraceHandler().trace("WARNING: parent callback called twice!!", 1, this); //$NON-NLS-1$ + } + else { + copyProperties(this, parentCallback); + if (!ProgressHelper.isCancelOrError(this, getStatus(), (IProgressMonitor) getProperty(PROPERTY_PROGRESS_MONITOR), parentCallback)) { - parentCallback.done(caller, getStatus()); + parentCallback.done(caller, getStatus()); + } } } } |