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

Regex instanceof changes
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 02:26:23 +0200
parents 65801ad2b265
children f70d9508c95c
line wrap: on
line diff
--- a/dwtx/jface/text/contentassist/ContextInformationPopup.d	Sun Aug 24 02:22:48 2008 +0200
+++ b/dwtx/jface/text/contentassist/ContextInformationPopup.d	Sun Aug 24 02:26:23 2008 +0200
@@ -122,7 +122,7 @@
          * @since 3.0
          */
         public bool equals(Object obj) {
-            if (obj instanceof ContextFrame) {
+            if ( cast(ContextFrame)obj ) {
                 ContextFrame frame= cast(ContextFrame) obj;
                 return fInformation.equals(frame.fInformation) && fBeginOffset is frame.fBeginOffset;
             }
@@ -329,7 +329,7 @@
         IContextInformationValidator validator= fContentAssistSubjectControlAdapter.getContextInformationValidator(fContentAssistant, offset);
 
         if (validator !is null) {
-            int beginOffset= (information instanceof IContextInformationExtension) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset;
+            int beginOffset= ( cast(IContextInformationExtension)information ) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset;
             if (beginOffset is -1) beginOffset= offset;
             int visibleOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x - (offset - beginOffset);
             IContextInformationPresenter presenter = fContentAssistSubjectControlAdapter.getContextInformationPresenter(fContentAssistant, offset);