diff dwtx/jface/text/link/LinkedModeUI.d @ 143:53b889547456

instanceof after &&
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 21:32:37 +0200
parents 26688fec6d23
children 75302ef3f92f
line wrap: on
line diff
--- a/dwtx/jface/text/link/LinkedModeUI.d	Sun Aug 24 21:29:00 2008 +0200
+++ b/dwtx/jface/text/link/LinkedModeUI.d	Sun Aug 24 21:32:37 2008 +0200
@@ -347,7 +347,7 @@
                 // Post in UI thread since the assistant popup will only get the focus after we lose it.
                 display.asyncExec(new class()  Runnable {
                     public void run() {
-                        if (fIsActive && viewer instanceof IEditingSupportRegistry) {
+                        if (fIsActive && cast(IEditingSupportRegistry)viewer ) {
                             IEditingSupport[] helpers= (cast(IEditingSupportRegistry) viewer).getRegisteredSupports();
                             for (int i= 0; i < helpers.length; i++) {
                                 if (helpers[i].ownsFocusShell())
@@ -400,7 +400,7 @@
             for (int offset= event.getOffset(); offset <= end; offset++) {
                 if (!fModel.anyPositionContains(offset)) {
                     ITextViewer viewer= fCurrentTarget.getViewer();
-                    if (fFramePosition !is null && viewer instanceof IEditingSupportRegistry) {
+                    if (fFramePosition !is null && cast(IEditingSupportRegistry)viewer ) {
                         IEditingSupport[] helpers= (cast(IEditingSupportRegistry) viewer).getRegisteredSupports();
                         for (int i= 0; i < helpers.length; i++) {
                             if (helpers[i].isOriginator(null, new Region(fFramePosition.getOffset(), fFramePosition.getLength())))