summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2011-06-30 04:57:51 (EDT)
committerSteffen Kriese2011-06-30 04:57:51 (EDT)
commitb89280dec681a5163f46e1e70667f446de96e588 (patch)
treeb7d335737c818bfcabe062044423c5a52beb3d20
parentc6aecbb0551abb9c1643b7e0725f7f12d3c866c4 (diff)
downloadorg.eclipse.riena-b89280dec681a5163f46e1e70667f446de96e588.zip
org.eclipse.riena-b89280dec681a5163f46e1e70667f446de96e588.tar.gz
org.eclipse.riena-b89280dec681a5163f46e1e70667f446de96e588.tar.bz2
fixed #350514 removedJjobListener after job is done and prevented creation of UICallbackDispatchers
-rw-r--r--org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/ProgressProviderBridge.java2
-rw-r--r--org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/UICallbackDispatcher.java7
2 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/ProgressProviderBridge.java b/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/ProgressProviderBridge.java
index ee70329..86a0fec 100644
--- a/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/ProgressProviderBridge.java
+++ b/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/ProgressProviderBridge.java
@@ -29,6 +29,7 @@ import org.eclipse.riena.core.singleton.SingletonProvider;
* A job can be presented by several instances of {@link ProgressProvider}. This
* one delegates to those providers.
*/
+@SuppressWarnings("restriction")
public class ProgressProviderBridge extends ProgressProvider {
private static final SingletonProvider<ProgressProviderBridge> PPB = new SingletonProvider<ProgressProviderBridge>(
@@ -78,6 +79,7 @@ public class ProgressProviderBridge extends ProgressProvider {
final Object context = getContext(job);
if (uiprocess == null) {
uiprocess = createDefaultUIProcess(job);
+ registerMapping(job, uiprocess);
}
final UICallbackDispatcher dispatcher = (UICallbackDispatcher) uiprocess.getAdapter(UICallbackDispatcher.class);
diff --git a/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/UICallbackDispatcher.java b/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/UICallbackDispatcher.java
index 6af0746..a3abe7e 100644
--- a/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/UICallbackDispatcher.java
+++ b/org.eclipse.riena.ui.core/src/org/eclipse/riena/ui/core/uiprocess/UICallbackDispatcher.java
@@ -95,7 +95,9 @@ public class UICallbackDispatcher extends ProgressProvider implements IUIMonitor
@Override
public void done(final IJobChangeEvent event) {
super.done(event);
- jobDone();
+ jobDone(job);
+ job.removeJobChangeListener(this);
+ jobListener = null;
}
};
job.addJobChangeListener(jobListener);
@@ -141,7 +143,7 @@ public class UICallbackDispatcher extends ProgressProvider implements IUIMonitor
};
}
- private void jobDone() {
+ private void jobDone(final Job job) {
synchronize(new Runnable() {
public void run() {
@@ -152,7 +154,6 @@ public class UICallbackDispatcher extends ProgressProvider implements IUIMonitor
Service.get(Activator.getDefault().getContext(), IExceptionHandlerManager.class)
.handleException(e);
}
-
}
}
});