Mercurial > projects > dwt-addons
changeset 142:893c017bcdc5
instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 21:29:00 +0200 |
parents | ea8dd2e11034 |
children | 53b889547456 |
files | dwtx/jface/internal/text/revisions/RevisionPainter.d dwtx/jface/text/AbstractHoverInformationControlManager.d dwtx/jface/text/information/InformationPresenter.d dwtx/jface/text/source/AnnotationBarHoverManager.d dwtx/jface/text/source/CompositeRuler.d dwtx/jface/text/source/LineNumberRulerColumn.d dwtx/jface/text/source/SourceViewer.d dwtx/jface/text/source/projection/ProjectionSummary.d |
diffstat | 8 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtx/jface/internal/text/revisions/RevisionPainter.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/internal/text/revisions/RevisionPainter.d Sun Aug 24 21:29:00 2008 +0200 @@ -818,7 +818,7 @@ * @param differ the line differ or <code>null</code> if none */ private void setDiffer(IAnnotationModel differ) { - if (differ instanceof ILineDiffer || differ is null) { + if ( cast(ILineDiffer)differ || differ is null) { if (fLineDiffer !is differ) { if (fLineDiffer !is null) (cast(IAnnotationModel) fLineDiffer).removeAnnotationModelListener(fAnnotationListener);
--- a/dwtx/jface/text/AbstractHoverInformationControlManager.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/AbstractHoverInformationControlManager.d Sun Aug 24 21:29:00 2008 +0200 @@ -828,11 +828,11 @@ return true; IInformationControl iControl= getCurrentInformationControl(); - if ((iControl instanceof IInformationControlExtension5 && !(cast(IInformationControlExtension5) iControl).isVisible())) { + if (( cast(IInformationControlExtension5)iControl && !(cast(IInformationControlExtension5) iControl).isVisible())) { iControl= null; if (getInformationControlReplacer() !is null) { iControl= getInformationControlReplacer().getCurrentInformationControl2(); - if ((iControl instanceof IInformationControlExtension5 && !(cast(IInformationControlExtension5) iControl).isVisible())) { + if (( cast(IInformationControlExtension5)iControl && !(cast(IInformationControlExtension5) iControl).isVisible())) { return false; } }
--- a/dwtx/jface/text/information/InformationPresenter.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/information/InformationPresenter.d Sun Aug 24 21:29:00 2008 +0200 @@ -433,7 +433,7 @@ * @see AbstractInformationControlManager#showInformationControl(Rectangle) */ protected void showInformationControl(Rectangle subjectArea) { - if (fTextViewer instanceof IWidgetTokenOwnerExtension && fTextViewer instanceof IWidgetTokenOwner) { + if ( cast(IWidgetTokenOwnerExtension)fTextViewer && fTextViewer instanceof IWidgetTokenOwner) { IWidgetTokenOwnerExtension extension= cast(IWidgetTokenOwnerExtension) fTextViewer; if (extension.requestWidgetToken(this, WIDGET_PRIORITY)) super.showInformationControl(subjectArea);
--- a/dwtx/jface/text/source/AnnotationBarHoverManager.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/source/AnnotationBarHoverManager.d Sun Aug 24 21:29:00 2008 +0200 @@ -646,7 +646,7 @@ CompositeRuler comp= cast(CompositeRuler) fVerticalRulerInfo; for (Iterator it= comp.getDecoratorIterator(); it.hasNext();) { Object o= it.next(); - if (o instanceof IVerticalRulerInfoExtension && o instanceof IVerticalRulerInfo) { + if ( cast(IVerticalRulerInfoExtension)o && o instanceof IVerticalRulerInfo) { if ((cast(IVerticalRulerInfo) o).getControl() is event.getSource()) { IAnnotationHover hover= (cast(IVerticalRulerInfoExtension) o).getHover(); if (hover !is null)
--- a/dwtx/jface/text/source/CompositeRuler.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/source/CompositeRuler.d Sun Aug 24 21:29:00 2008 +0200 @@ -670,7 +670,7 @@ parent= extension.getControl(); } - if (parent instanceof Composite && !parent.isDisposed()) + if ( cast(Composite)parent && !parent.isDisposed()) (cast(Composite) parent).layout(true); }
--- a/dwtx/jface/text/source/LineNumberRulerColumn.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/source/LineNumberRulerColumn.d Sun Aug 24 21:29:00 2008 +0200 @@ -599,7 +599,7 @@ if ( cast(ITextViewerExtension)fCachedTextViewer ) { ITextViewerExtension extension= cast(ITextViewerExtension) fCachedTextViewer; Control control= extension.getControl(); - if (control instanceof Composite && !control.isDisposed()) { + if ( cast(Composite)control && !control.isDisposed()) { Composite composite= cast(Composite) control; composite.layout(true); }
--- a/dwtx/jface/text/source/SourceViewer.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/source/SourceViewer.d Sun Aug 24 21:29:00 2008 +0200 @@ -435,7 +435,7 @@ fContentAssistant= configuration.getContentAssistant(this); if (fContentAssistant !is null) { fContentAssistant.install(this); - if (fContentAssistant instanceof IContentAssistantExtension4 && fContentAssistant instanceof IContentAssistantExtension4) + if ( cast(IContentAssistantExtension4)fContentAssistant && fContentAssistant instanceof IContentAssistantExtension4) fContentAssistantFacade= new ContentAssistantFacade(fContentAssistant); fContentAssistantInstalled= true; }
--- a/dwtx/jface/text/source/projection/ProjectionSummary.d Sun Aug 24 21:25:28 2008 +0200 +++ b/dwtx/jface/text/source/projection/ProjectionSummary.d Sun Aug 24 21:29:00 2008 +0200 @@ -174,7 +174,7 @@ IDocument document= fProjectionViewer.getDocument(); - if (document instanceof ISynchronizable && fAnnotationModel instanceof ISynchronizable) { + if ( cast(ISynchronizable)document && fAnnotationModel instanceof ISynchronizable) { ISynchronizable sync= cast(ISynchronizable) fAnnotationModel; previousLockObject= sync.getLockObject(); sync.setLockObject((cast(ISynchronizable) document).getLockObject());