diff dwtx/jface/text/source/projection/ProjectionRulerColumn.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/source/projection/ProjectionRulerColumn.d	Sun Aug 24 02:22:48 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionRulerColumn.d	Sun Aug 24 02:26:23 2008 +0200
@@ -111,7 +111,7 @@
             Iterator e= model.getAnnotationIterator();
             while (e.hasNext()) {
                 Object next= e.next();
-                if (next instanceof ProjectionAnnotation) {
+                if ( cast(ProjectionAnnotation)next ) {
                     ProjectionAnnotation annotation= cast(ProjectionAnnotation) next;
                     Position p= model.getPosition(annotation);
                     if (p is null)
@@ -154,7 +154,7 @@
                 if (startLine <= line && line < endLine) {
                     if (annotation.isCollapsed()) {
                         int captionOffset;
-                        if (position instanceof IProjectionPosition)
+                        if ( cast(IProjectionPosition)position )
                             captionOffset= (cast(IProjectionPosition) position).computeCaptionOffset(document);
                         else
                             captionOffset= 0;
@@ -226,7 +226,7 @@
      * @see dwtx.jface.text.source.AnnotationRulerColumn#setModel(dwtx.jface.text.source.IAnnotationModel)
      */
     public void setModel(IAnnotationModel model) {
-        if (model instanceof IAnnotationModelExtension) {
+        if ( cast(IAnnotationModelExtension)model ) {
             IAnnotationModelExtension extension= cast(IAnnotationModelExtension) model;
             model= extension.getAnnotationModel(ProjectionSupport.PROJECTION);
         }