diff org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.d @ 85:6be48cf9f95c

Work on databinding
author Frank Benoit <benoit@tionex.de>
date Sat, 18 Apr 2009 13:54:50 +0200
parents 383ce7bd736b
children 9e0ab372d5d8
line wrap: on
line diff
--- a/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.d	Sat Apr 18 09:25:29 2009 +0200
+++ b/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/set/MappedSet.d	Sat Apr 18 13:54:50 2009 +0200
@@ -49,9 +49,10 @@
     /*
      * Map from values (range elements) to Integer ref counts
      */
-    private Map valueCounts = new HashMap();
+    private Map valueCounts;
 
-    private ISetChangeListener domainListener = new class() ISetChangeListener {
+    private ISetChangeListener domainListener;
+    class DomainListener : ISetChangeListener {
         public void handleSetChange(SetChangeEvent event) {
             Set additions = new HashSet();
             for (Iterator it = event.diff.getAdditions().iterator(); it.hasNext();) {
@@ -73,7 +74,8 @@
         }
     };
 
-    private IMapChangeListener mapChangeListener = new class() IMapChangeListener {
+    private IMapChangeListener mapChangeListener;
+    class MapChangeListener : IMapChangeListener {
         public void handleMapChange(MapChangeEvent event) {
             MapDiff diff = event.diff;
             Set additions = new HashSet();
@@ -114,7 +116,10 @@
      * @param map
      */
     public this(IObservableSet input, IObservableMap map) {
-        super(input.getRealm(), Collections.EMPTY_SET, Object.classinfo);
+valueCounts = new HashMap();
+domainListener = new DomainListener();
+mapChangeListener = new MapChangeListener();
+        super(input.getRealm(), Collections.EMPTY_SET, typeid(Object));
         setWrappedSet(valueCounts.keySet());
         this.wrappedMap = map;
         this.input = input;