diff dwtx/jface/text/contentassist/PopupCloser.d @ 140:26688fec6d23

Following dsss compile errors
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 03:23:46 +0200
parents b6bad70d540a
children 25f1f92fa3df
line wrap: on
line diff
--- a/dwtx/jface/text/contentassist/PopupCloser.d	Sun Aug 24 02:31:41 2008 +0200
+++ b/dwtx/jface/text/contentassist/PopupCloser.d	Sun Aug 24 03:23:46 2008 +0200
@@ -112,7 +112,7 @@
     public void install(ContentAssistant contentAssistant, Table table) {
         install(contentAssistant, table, null);
     }
-    
+
     /**
      * Installs this closer on the given table opened by the given content assistant.
      *
@@ -125,22 +125,22 @@
         fContentAssistant= contentAssistant;
         fTable= table;
         fAdditionalInfoController= additionalInfoController;
-        
+
         if (Helper.okToUse(fTable)) {
             fShell= fTable.getShell();
             fDisplay= fShell.getDisplay();
-            
+
             fShell.addShellListener(this);
             fTable.addFocusListener(this);
             fScrollbar= fTable.getVerticalBar();
             if (fScrollbar !is null)
                 fScrollbar.addSelectionListener(this);
-            
+
             fDisplay.addFilter(DWT.Activate, this);
             fDisplay.addFilter(DWT.MouseWheel, this);
-            
+
             fDisplay.addFilter(DWT.Deactivate, this);
-            
+
             fDisplay.addFilter(DWT.MouseUp, this);
         }
     }
@@ -160,9 +160,9 @@
         if (fDisplay !is null && ! fDisplay.isDisposed()) {
             fDisplay.removeFilter(DWT.Activate, this);
             fDisplay.removeFilter(DWT.MouseWheel, this);
-            
+
             fDisplay.removeFilter(DWT.Deactivate, this);
-            
+
             fDisplay.removeFilter(DWT.MouseUp, this);
         }
     }
@@ -232,13 +232,13 @@
                     return;
                 if (event.widget is fShell || event.widget is fTable || event.widget is fScrollbar)
                     return;
-                
+
                 if (fAdditionalInfoController.getInternalAccessor().getInformationControlReplacer() is null)
                     fAdditionalInfoController.hideInformationControl();
                 else if (!fAdditionalInfoController.getInternalAccessor().isReplaceInProgress()) {
                     IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2();
                     // During isReplaceInProgress(), events can come from the replacing information control
-                    if (event.widget instanceof Control && infoControl instanceof IInformationControlExtension5) {
+                    if (cast(Control)event.widget && cast(IInformationControlExtension5)infoControl ) {
                         Control control= cast(Control) event.widget;
                         IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl;
                         if (!(iControl5.containsControl(control)))
@@ -250,11 +250,11 @@
                     }
                 }
                 break;
-                
+
             case DWT.MouseUp:
                 if (fAdditionalInfoController is null || fAdditionalInfoController.getInternalAccessor().isReplaceInProgress())
                     break;
-                if (event.widget instanceof Control) {
+                if (cast(Control)event.widget) {
                     Control control= cast(Control) event.widget;
                     IInformationControl infoControl= fAdditionalInfoController.getCurrentInformationControl2();
                     if ( cast(IInformationControlExtension5)infoControl ) {
@@ -271,7 +271,7 @@
                                     }
                                 });
                             }
-                            
+
                             // XXX: workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=212392 :
                             control.getShell().getDisplay().asyncExec(new class()  Runnable {
                                 public void run() {
@@ -282,14 +282,14 @@
                     }
                 }
                 break;
-    
+
             case DWT.Deactivate:
                 if (fAdditionalInfoController is null)
                     break;
                 InformationControlReplacer replacer= fAdditionalInfoController.getInternalAccessor().getInformationControlReplacer();
                 if (replacer !is null && fContentAssistant !is null) {
                     IInformationControl iControl= replacer.getCurrentInformationControl2();
-                    if (event.widget instanceof Control && iControl instanceof IInformationControlExtension5) {
+                    if (cast(Control)event.widget  && cast(IInformationControlExtension5)iControl ) {
                         Control control= cast(Control) event.widget;
                         IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) iControl;
                         if (iControl5.containsControl(control)) {