Mercurial > projects > dwt-addons
diff dwtx/jface/text/AbstractInformationControlManager.d @ 138:b6bad70d540a
Regex instanceof changes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:26:23 +0200 |
parents | 25170b5a8951 |
children | 93a6ec48fd28 |
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractInformationControlManager.d Sun Aug 24 02:22:48 2008 +0200 +++ b/dwtx/jface/text/AbstractInformationControlManager.d Sun Aug 24 02:26:23 2008 +0200 @@ -860,7 +860,7 @@ protected Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl) { if (fSizeConstraints is null) { - if (informationControl instanceof IInformationControlExtension5) { + if ( cast(IInformationControlExtension5)informationControl ) { IInformationControlExtension5 iControl5= cast(IInformationControlExtension5) informationControl; fSizeConstraints= iControl5.computeSizeConstraints(fWidthConstraint, fHeightConstraint); if (fSizeConstraints !is null) @@ -902,7 +902,7 @@ storeInformationControlBounds(); - if (fInformationControl instanceof IInformationControlExtension5) + if ( cast(IInformationControlExtension5)fInformationControl ) fSizeConstraints= null; fInformationControl= null; if (fInformationControlCloser !is null) { @@ -927,7 +927,7 @@ if (fCustomInformationControlCreator is null) { creator= fInformationControlCreator; if (fIsCustomInformationControl && fInformationControl !is null) { - if (fInformationControl instanceof IInformationControlExtension5) + if ( cast(IInformationControlExtension5)fInformationControl ) fSizeConstraints= null; fInformationControl.dispose(); fInformationControl= null; @@ -937,13 +937,13 @@ } else { creator= fCustomInformationControlCreator; - if (creator instanceof IInformationControlCreatorExtension) { + if ( cast(IInformationControlCreatorExtension)creator ) { IInformationControlCreatorExtension extension= cast(IInformationControlCreatorExtension) creator; if (fInformationControl !is null && extension.canReuse(fInformationControl)) return fInformationControl; } if (fInformationControl !is null) { - if (fInformationControl instanceof IInformationControlExtension5) + if ( cast(IInformationControlExtension5)fInformationControl ) fSizeConstraints= null; fInformationControl.dispose(); fInformationControl= null; @@ -1274,7 +1274,7 @@ */ protected void presentInformation() { bool hasContents= false; - if (fInformation instanceof String) + if ( cast(String)fInformation ) hasContents= (cast(String)fInformation).trim().length() > 0; else hasContents= (fInformation !is null); @@ -1293,7 +1293,7 @@ * @param information the information */ private void internalShowInformationControl(Rectangle subjectArea, Object information) { - if (this instanceof InformationControlReplacer) { + if ( cast(InformationControlReplacer)this ) { (cast(InformationControlReplacer) this).showInformationControl(subjectArea, information); return; } @@ -1302,7 +1302,7 @@ if (informationControl !is null) { Point sizeConstraints= computeSizeConstraints(fSubjectControl, fSubjectArea, informationControl); - if (informationControl instanceof IInformationControlExtension3) { + if ( cast(IInformationControlExtension3)informationControl ) { IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) informationControl; Rectangle trim= iControl3.computeTrim(); sizeConstraints.x += trim.width; @@ -1310,12 +1310,12 @@ } informationControl.setSizeConstraints(sizeConstraints.x, sizeConstraints.y); - if (informationControl instanceof IInformationControlExtension2) + if ( cast(IInformationControlExtension2)informationControl ) (cast(IInformationControlExtension2)informationControl).setInput(information); else informationControl.setInformation(information.toString()); - if (informationControl instanceof IInformationControlExtension) { + if ( cast(IInformationControlExtension)informationControl ) { IInformationControlExtension extension= cast(IInformationControlExtension)informationControl; if (!extension.hasContents()) return; @@ -1465,7 +1465,7 @@ if (fDialogSettings is null || fInformationControl is null || !(fIsRestoringLocation || fIsRestoringSize)) return; - if (!(fInformationControl instanceof IInformationControlExtension3)) + if (!( cast(IInformationControlExtension3)fInformationControl )) throw new UnsupportedOperationException(); bool controlRestoresSize= (cast(IInformationControlExtension3)fInformationControl).restoresSize(); @@ -1494,7 +1494,7 @@ if (fDialogSettings is null || !(fIsRestoringLocation || fIsRestoringSize)) return null; - if (!(fInformationControl instanceof IInformationControlExtension3)) + if (!( cast(IInformationControlExtension3)fInformationControl )) throw new UnsupportedOperationException(); bool controlRestoresSize= (cast(IInformationControlExtension3)fInformationControl).restoresSize();