Mercurial > projects > dwt-addons
changeset 149:b411f1c62131
instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 22:41:48 +0200 |
parents | b3dec671d1f7 |
children | 5cf141e43417 |
files | dwtx/jface/internal/text/StickyHoverManager.d dwtx/jface/text/AbstractHoverInformationControlManager.d dwtx/jface/text/link/LinkedModeUI.d |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtx/jface/internal/text/StickyHoverManager.d Sun Aug 24 22:40:25 2008 +0200 +++ b/dwtx/jface/internal/text/StickyHoverManager.d Sun Aug 24 22:41:48 2008 +0200 @@ -245,7 +245,7 @@ */ public void handleEvent(Event event) { if (event.type is DWT.MouseMove) { - if (!(event.widget instanceof Control) || event.widget.isDisposed()) + if (!( cast(Control)event.widget ) || event.widget.isDisposed()) return; IInformationControl infoControl= getCurrentInformationControl2();
--- a/dwtx/jface/text/AbstractHoverInformationControlManager.d Sun Aug 24 22:40:25 2008 +0200 +++ b/dwtx/jface/text/AbstractHoverInformationControlManager.d Sun Aug 24 22:41:48 2008 +0200 @@ -428,7 +428,7 @@ else if (!isReplaceInProgress()) { IInformationControl infoControl= getCurrentInformationControl(); // During isReplaceInProgress(), events can come from the replacing information control - if (event.widget instanceof Control && cast(IInformationControlExtension5)infoControl ) { + if ( cast(Control)event.widget && cast(IInformationControlExtension5)infoControl ) { Control control= cast(Control) event.widget; IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl; if (!(iControl5.containsControl(control))) @@ -447,7 +447,7 @@ hideInformationControl(); else if (!isReplaceInProgress()) { IInformationControl infoControl= getCurrentInformationControl(); - if (event.widget instanceof Control && cast(IInformationControlExtension5)infoControl ) { + if ( cast(Control)event.widget && cast(IInformationControlExtension5)infoControl ) { Control control= cast(Control) event.widget; final IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) infoControl; if (!(iControl5.containsControl(control))) { @@ -507,7 +507,7 @@ // if (DEBUG) // System.out_.println("AbstractHoverInformationControl.Closer.handleMouseMove():" + event); //$NON-NLS-1$ - if (!(event.widget instanceof Control)) + if (!( cast(Control)event.widget )) return; Control eventControl= cast(Control) event.widget; @@ -519,7 +519,7 @@ IInformationControl iControl= getCurrentInformationControl(); if (!hasInformationControlReplacer() || !canMoveIntoInformationControl(iControl)) { - if (this.outer instanceof AnnotationBarHoverManager) { + if ( cast(AnnotationBarHoverManager)this.outer ) { if (getInternalAccessor().getAllowMouseExit()) return; }
--- a/dwtx/jface/text/link/LinkedModeUI.d Sun Aug 24 22:40:25 2008 +0200 +++ b/dwtx/jface/text/link/LinkedModeUI.d Sun Aug 24 22:41:48 2008 +0200 @@ -542,7 +542,7 @@ ISelection selection= event.getSelection(); if ( cast(ITextSelection)selection ) { ITextSelection textsel= cast(ITextSelection) selection; - if (event.getSelectionProvider() instanceof ITextViewer) { + if ( cast(ITextViewer)event.getSelectionProvider() ) { IDocument doc= (cast(ITextViewer) event.getSelectionProvider()).getDocument(); if (doc !is null) { int offset= textsel.getOffset();