diff dwtx/jface/text/source/projection/ProjectionViewer.d @ 143:53b889547456

instanceof after &&
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 21:32:37 +0200
parents b6bad70d540a
children 02cd5f1224d3
line wrap: on
line diff
--- a/dwtx/jface/text/source/projection/ProjectionViewer.d	Sun Aug 24 21:29:00 2008 +0200
+++ b/dwtx/jface/text/source/projection/ProjectionViewer.d	Sun Aug 24 21:32:37 2008 +0200
@@ -1353,7 +1353,7 @@
      * @see dwtx.jface.text.TextViewer#handleVisibleDocumentAboutToBeChanged(dwtx.jface.text.DocumentEvent)
      */
     protected void handleVisibleDocumentChanged(DocumentEvent event) {
-        if (fHandleProjectionChanges && event instanceof ProjectionDocumentEvent && isProjectionMode()) {
+        if (fHandleProjectionChanges && cast(ProjectionDocumentEvent)event  && isProjectionMode()) {
             ProjectionDocumentEvent e= cast(ProjectionDocumentEvent) event;
 
             DocumentEvent master= e.getMasterEvent();
@@ -1387,7 +1387,7 @@
      * @since 3.1
      */
     protected void handleVisibleDocumentAboutToBeChanged(DocumentEvent event) {
-        if (fHandleProjectionChanges && event instanceof ProjectionDocumentEvent && isProjectionMode()) {
+        if (fHandleProjectionChanges && cast(ProjectionDocumentEvent)event  && isProjectionMode()) {
             int deletedLines;
             try {
                 deletedLines= event.getDocument().getNumberOfLines(event.getOffset(), event.getLength());