diff dwtx/jface/text/AbstractReusableInformationControlCreator.d @ 162:1a5b8f8129df

...
author Frank Benoit <benoit@tionex.de>
date Mon, 08 Sep 2008 00:51:37 +0200
parents f70d9508c95c
children
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractReusableInformationControlCreator.d	Wed Aug 27 14:49:30 2008 +0200
+++ b/dwtx/jface/text/AbstractReusableInformationControlCreator.d	Mon Sep 08 00:51:37 2008 +0200
@@ -172,7 +172,7 @@
  */
 public abstract class AbstractReusableInformationControlCreator : IInformationControlCreator, IInformationControlCreatorExtension, DisposeListener {
 
-    private Map fInformationControls= new HashMap();
+    private Map fInformationControls;
 
     /**
      * Creates the control.
@@ -182,6 +182,10 @@
      */
     protected abstract IInformationControl doCreateInformationControl(Shell parent);
 
+    this(){
+        fInformationControls= new HashMap();
+    }
+
     /*
      * @see dwtx.jface.text.IInformationControlCreator#createInformationControl(dwt.widgets.Shell)
      */
@@ -190,7 +194,7 @@
         if (control is null) {
             control= doCreateInformationControl(parent);
             control.addDisposeListener(this);
-            fInformationControls.put(parent, control);
+            fInformationControls.put(parent, cast(Object)control);
         }
         return control;
     }
@@ -211,13 +215,13 @@
      * @see dwtx.jface.text.IInformationControlCreatorExtension#canReuse(dwtx.jface.text.IInformationControl)
      */
     public bool canReuse(IInformationControl control) {
-        return fInformationControls.containsValue(control);
+        return fInformationControls.containsValue(cast(Object)control);
     }
 
     /*
      * @see dwtx.jface.text.IInformationControlCreatorExtension#canReplace(dwtx.jface.text.IInformationControlCreator)
      */
     public bool canReplace(IInformationControlCreator creator) {
-        return creator.getClass() is getClass();
+        return creator.classinfo is this.classinfo;
     }
 }