diff dwtx/jface/text/AbstractInformationControl.d @ 161:f8d52b926852

...
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:49:30 +0200
parents a9566845f1cb
children
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractInformationControl.d	Wed Aug 27 02:07:22 2008 +0200
+++ b/dwtx/jface/text/AbstractInformationControl.d	Wed Aug 27 14:49:30 2008 +0200
@@ -60,7 +60,7 @@
 import dwtx.jface.text.IDocumentExtension4; // packageimport
 import dwtx.jface.text.IDocumentExtension2; // packageimport
 import dwtx.jface.text.IDocumentPartitionerExtension2; // packageimport
-import dwtx.jface.text.Assert; // packageimport
+// import dwtx.jface.text.Assert; // packageimport
 import dwtx.jface.text.DefaultInformationControl; // packageimport
 import dwtx.jface.text.IWidgetTokenOwnerExtension; // packageimport
 import dwtx.jface.text.DocumentClone; // packageimport
@@ -153,12 +153,8 @@
 import dwtx.jface.text.ITextViewerExtension4; // packageimport
 import dwtx.jface.text.ITypedRegion; // packageimport
 
-
 import dwt.dwthelper.utils;
 
-
-
-
 import dwt.DWT;
 import dwt.events.DisposeListener;
 import dwt.events.FocusEvent;
@@ -236,7 +232,7 @@
     /** Listener for shell activation and deactivation. */
     private Listener fShellListener;
     /** All focus listeners registered to this information control. */
-    private ListenerList fFocusListeners= new ListenerList(ListenerList.IDENTITY);
+    private ListenerList fFocusListeners;
 
     /** Size constraints, x is the maxWidth and y is the maxHeight, or <code>null</code> if not set. */
     private Point fSizeConstraints;
@@ -305,6 +301,9 @@
      * @deprecated clients should use one of the public constructors
      */
     this(Shell parentShell, int shellStyle, String statusFieldText, ToolBarManager toolBarManager) {
+
+        fFocusListeners= new ListenerList(ListenerList.IDENTITY);
+
         Assert.isTrue(statusFieldText is null || toolBarManager is null);
         fResizeHandleSize= -1;
         fToolBarManager= toolBarManager;
@@ -811,7 +810,7 @@
             fShell.addListener(DWT.Deactivate, fShellListener);
             fShell.addListener(DWT.Activate, fShellListener);
         }
-        fFocusListeners.add(listener);
+        fFocusListeners.add(cast(Object)listener);
     }
 
     /**
@@ -819,7 +818,7 @@
      * This method is not intended to be overridden by subclasses.
      */
     public void removeFocusListener(FocusListener listener) {
-        fFocusListeners.remove(listener);
+        fFocusListeners.remove(cast(Object)listener);
         if (fFocusListeners.isEmpty()) {
             fShell.removeListener(DWT.Activate, fShellListener);
             fShell.removeListener(DWT.Deactivate, fShellListener);