aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbel Hegedus2013-09-27 13:04:09 (EDT)
committerPaul Webster2013-09-27 13:04:09 (EDT)
commit69ebc69aecd2f89760f5a102fc5d57f0b5092f71 (patch)
treeffab1e253789116b258842f4c97a0d8db9c67af8
parent287abef5328cdd358799a17c8caa2fdfe4e90f19 (diff)
downloadeclipse.platform.ui-69ebc69aecd2f89760f5a102fc5d57f0b5092f71.zip
eclipse.platform.ui-69ebc69aecd2f89760f5a102fc5d57f0b5092f71.tar.gz
eclipse.platform.ui-69ebc69aecd2f89760f5a102fc5d57f0b5092f71.tar.bz2
Bug 414297 - [DataBinding] missing SetChanged notification
Cache the old set before overwriting it Signed-off-by: Abel Hegedus <hegedusa@mit.bme.hu>
-rw-r--r--bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ComputedSet.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ComputedSet.java b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ComputedSet.java
index 827dc65..fcdae40 100644
--- a/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ComputedSet.java
+++ b/bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/ComputedSet.java
@@ -8,6 +8,7 @@
* Contributors:
* Matthew Hall - initial API and implementation (bug 237703)
* Matthew Hall - bug 274081
+ * Abel Hegedus - bug 414297
*******************************************************************************/
package org.eclipse.core.databinding.observable.set;
@@ -227,12 +228,15 @@ public abstract class ComputedSet extends AbstractObservableSet {
if (!dirty) {
dirty = true;
+ // copy the old set
+ // bug 414297: moved before makeStale(), as cachedSet may be
+ // overwritten
+ // in makeStale() if a listener calls isStale()
+ final Set oldSet = new HashSet(cachedSet);
makeStale();
stopListening();
- // copy the old set
- final Set oldSet = new HashSet(cachedSet);
// Fire the "dirty" event. This implementation recomputes the new
// set lazily.
fireSetChange(new SetDiff() {