Mercurial > projects > dwt2
diff org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.d @ 85:6be48cf9f95c
Work on databinding
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 18 Apr 2009 13:54:50 +0200 |
parents | 383ce7bd736b |
children |
line wrap: on
line diff
--- a/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.d Sat Apr 18 09:25:29 2009 +0200 +++ b/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/StalenessTracker.d Sat Apr 18 13:54:50 2009 +0200 @@ -30,7 +30,7 @@ */ public class StalenessTracker { - private Map staleMap = new HashMap(); + private Map staleMap; private int staleCount = 0; @@ -46,7 +46,7 @@ } } - private ChildListener childListener = new ChildListener(); + private ChildListener childListener; /** * @param observables @@ -54,6 +54,8 @@ */ public this(IObservable[] observables, IStalenessConsumer stalenessConsumer) { +childListener = new ChildListener(); +staleMap = new HashMap(); this.stalenessConsumer = stalenessConsumer; for (int i = 0; i < observables.length; i++) { IObservable observable = observables[i]; @@ -68,7 +70,7 @@ */ public void processStalenessChange(IObservable child, bool callback) { bool oldStale = staleCount > 0; - IdentityWrapper wrappedChild = new IdentityWrapper(child); + IdentityWrapper wrappedChild = new IdentityWrapper(cast(Object)child); bool oldChildStale = getOldChildStale(wrappedChild); bool newChildStale = child.isStale(); if (oldChildStale !is newChildStale) { @@ -113,7 +115,7 @@ */ public void removeObservable(IObservable observable) { bool oldStale = staleCount > 0; - IdentityWrapper wrappedChild = new IdentityWrapper(observable); + IdentityWrapper wrappedChild = new IdentityWrapper(cast(Object)observable); bool oldChildStale = getOldChildStale(wrappedChild); if (oldChildStale) { staleCount--;