Mercurial > projects > dwt-addons
diff dwtx/jface/text/AbstractHoverInformationControlManager.d @ 149:b411f1c62131
instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 22:41:48 +0200 |
parents | b3dec671d1f7 |
children | 5cf141e43417 |
line wrap: on
line diff
--- 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; }