diff dwtx/jface/text/contentassist/AdditionalInfoController.d @ 138:b6bad70d540a

Regex instanceof changes
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 02:26:23 +0200
parents 25170b5a8951
children 93a6ec48fd28
line wrap: on
line diff
--- a/dwtx/jface/text/contentassist/AdditionalInfoController.d	Sun Aug 24 02:22:48 2008 +0200
+++ b/dwtx/jface/text/contentassist/AdditionalInfoController.d	Sun Aug 24 02:26:23 2008 +0200
@@ -356,7 +356,7 @@
         }
         
         ICompletionProposalExtension5 getCurrentProposalEx() {
-            Assert.isTrue(fCurrentProposal instanceof ICompletionProposalExtension5);
+            Assert.isTrue( cast(ICompletionProposalExtension5)fCurrentProposal );
             return cast(ICompletionProposalExtension5) fCurrentProposal;
         }
 
@@ -486,7 +486,7 @@
 
         super.install(control.getShell());
 
-        Assert.isTrue(control instanceof Table);
+        Assert.isTrue( cast(Table)control );
         fProposalTable= cast(Table) control;
         fProposalTable.addSelectionListener(fSelectionListener);
         getInternalAccessor().getInformationControlReplacer().install(fProposalTable);
@@ -534,7 +534,7 @@
                 TableItem item= selection[0];
 
                 Object d= item.getData();
-                if (d instanceof ICompletionProposal) {
+                if ( cast(ICompletionProposal)d ) {
                     ICompletionProposal p= cast(ICompletionProposal) d;
                     fTimer.reset(p);
                 }
@@ -558,7 +558,7 @@
      * @see AbstractInformationControlManager#computeInformation()
      */
     protected void computeInformation() {
-        if (fProposal instanceof ICompletionProposalExtension3)
+        if ( cast(ICompletionProposalExtension3)fProposal )
             setCustomInformationControlCreator((cast(ICompletionProposalExtension3) fProposal).getInformationControlCreator());
         else
             setCustomInformationControlCreator(null);
@@ -599,7 +599,7 @@
         // AbstractInformationControlManager#internalShowInformationControl(Rectangle, Object) adds trims
         // to the computed constraints. Need to remove them here, to make the outer bounds of the additional
         // info shell fit the bounds of the proposal shell:
-        if (fInformationControl instanceof IInformationControlExtension3) {
+        if ( cast(IInformationControlExtension3)fInformationControl ) {
             Rectangle shellTrim= (cast(IInformationControlExtension3) fInformationControl).computeTrim();
             size.x -= shellTrim.width;
             size.y -= shellTrim.height;