Mercurial > projects > dwt-addons
diff dwtx/jface/text/AbstractInformationControlManager.d @ 139:93a6ec48fd28
Regexp throws removal in interfaces
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:31:41 +0200 |
parents | b6bad70d540a |
children | 75302ef3f92f |
line wrap: on
line diff
--- a/dwtx/jface/text/AbstractInformationControlManager.d Sun Aug 24 02:26:23 2008 +0200 +++ b/dwtx/jface/text/AbstractInformationControlManager.d Sun Aug 24 02:31:41 2008 +0200 @@ -200,30 +200,30 @@ /** * An internal class that gives access to internal methods. - * + * * @since 3.4 */ class MyInternalAccessor : InternalAccessor { public IInformationControl getCurrentInformationControl() { return this.outer.getCurrentInformationControl(); } - + public void setInformationControlReplacer(InformationControlReplacer replacer) { this.outer.setInformationControlReplacer(replacer); } - + public InformationControlReplacer getInformationControlReplacer() { return this.outer.getInformationControlReplacer(); } - + public bool canReplace(IInformationControl control) { return this.outer.canReplace(control); } - + public bool isReplaceInProgress() { return this.outer.isReplaceInProgress(); } - + public void replaceInformationControl(bool takeFocus) { this.outer.replaceInformationControl(takeFocus); } @@ -231,11 +231,11 @@ public void cropToClosestMonitor(Rectangle bounds) { this.outer.cropToClosestMonitor(bounds); } - + public void setHoverEnrichMode(EnrichMode mode) { throw new UnsupportedOperationException("only implemented in AbstractHoverInformationControlManager"); //$NON-NLS-1$ } - + public bool getAllowMouseExit() { throw new UnsupportedOperationException("only implemented in AnnotationBarHoverManager"); //$NON-NLS-1$ } @@ -299,14 +299,14 @@ /** * Returns the DWT direction flag. One of {@link DWT#BOTTOM}, {@link DWT#TOP}, * {@link DWT#LEFT}, {@link DWT#RIGHT}, {@link DWT#CENTER}, - * + * * @return the DWT direction flag * @since 3.3 */ int getSWTFlag() { return fFlag; } - + public String toString() { switch (fFlag) { case DWT.BOTTOM: return "BOTTOM"; //$NON-NLS-1$ @@ -356,7 +356,7 @@ * @since 3.0 */ public static final String STORE_SIZE_HEIGHT= "size.height"; //$NON-NLS-1$ - + /** * Tells whether this class and its subclasses are in debug mode. * <p> @@ -381,7 +381,7 @@ /** * The information control. - * + * * <p>This field should not be referenced by subclasses. It is <code>protected</code> for API * compatibility reasons. */ @@ -389,7 +389,7 @@ /** * The information control creator. - * + * * <p>This field should not be referenced by subclasses. It is <code>protected</code> for API * compatibility reasons. */ @@ -397,7 +397,7 @@ /** * The information control closer. - * + * * <p>This field should not be referenced by subclasses. It is <code>protected</code> for API * compatibility reasons. */ @@ -405,7 +405,7 @@ /** * Indicates that the information control has been disposed. - * + * * <p>This field should not be referenced by subclasses. It is <code>protected</code> for API * compatibility reasons. */ @@ -414,7 +414,7 @@ /** * The information control replacer to be used when this information control * needs to be replaced with another information control. - * + * * @since 3.4 */ private InformationControlReplacer fInformationControlReplacer; @@ -499,7 +499,7 @@ /** * The dispose listener on the subject control. - * + * * @since 3.1 */ private DisposeListener fSubjectControlDisposeListener; @@ -572,11 +572,11 @@ protected void setCloser(IInformationControlCloser closer) { fInformationControlCloser= closer; } - + /** * Sets the information control replacer for this manager and disposes the * old one if set. - * + * * @param replacer the information control replacer for this manager, or * <code>null</code> if no information control replacing should * take place @@ -590,7 +590,7 @@ /** * Returns the current information control replacer or <code>null</code> if none has been installed. - * + * * @return the current information control replacer or <code>null</code> if none has been installed * @since 3.4 */ @@ -600,30 +600,30 @@ /** * Returns whether an information control replacer has been installed. - * + * * @return whether an information control replacer has been installed * @since 3.4 */ bool hasInformationControlReplacer() { return fInformationControlReplacer !is null; } - + /** * Tests whether the given information control is replaceable. - * + * * @param iControl information control or <code>null</code> if none * @return <code>true</code> if information control is replaceable, <code>false</code> otherwise * @since 3.4 */ bool canReplace(IInformationControl iControl) { - return iControl instanceof IInformationControlExtension3 - && iControl instanceof IInformationControlExtension5 + return cast(IInformationControlExtension3)iControl + && cast(IInformationControlExtension5)iControl && (cast(IInformationControlExtension5) iControl).getInformationPresenterControlCreator() !is null; } - + /** * Returns the current information control, or <code>null</code> if none. - * + * * @return the current information control, or <code>null</code> if none * @since 3.4 */ @@ -633,7 +633,7 @@ /** * Tells whether this manager's information control is currently being replaced. - * + * * @return <code>true</code> if a replace is in progress * @since 3.4 */ @@ -644,7 +644,7 @@ /** * Sets the horizontal and vertical margin to be used when laying out the * information control relative to the subject control. - * + * * @param xMargin the x-margin * @param yMargin the y-Margin */ @@ -744,7 +744,7 @@ * @since 3.0 */ protected void setCustomInformationControlCreator(IInformationControlCreator informationControlCreator) { - if (informationControlCreator !is null && fCustomInformationControlCreator instanceof IInformationControlCreatorExtension) { + if (informationControlCreator !is null && cast(IInformationControlCreatorExtension)fCustomInformationControlCreator) { IInformationControlCreatorExtension extension= cast(IInformationControlCreatorExtension) fCustomInformationControlCreator; if (extension.canReplace(informationControlCreator)) return; @@ -792,11 +792,11 @@ setEnabled(true); fDisposed= false; } - + /** * Returns the dispose listener which gets added * to the subject control. - * + * * @return the dispose listener * @since 3.1 */ @@ -1008,11 +1008,11 @@ return fSubjectControl.toDisplay(new Point(subjectArea.x + xShift, subjectArea.y + yShift)); } - + /** * Computes the area available for an information control given an anchor and the subject area * within <code>bounds</code>. - * + * * @param subjectArea the subject area * @param bounds the bounds * @param anchor the anchor at the subject area @@ -1049,7 +1049,7 @@ area.intersect(bounds); return area; } - + /** * Checks whether a control of the given size at the given location would be completely visible * in the given display area when laid out by using the given anchor. If not, this method tries @@ -1171,7 +1171,7 @@ Monitor monitor= getClosestMonitor(subjectAreaDisplayRelative, testAnchor); if (updateLocation(upperLeft, controlSize, monitor.getClientArea(), testAnchor)) return upperLeft; - + // compute available area for this anchor and update if better than best Rectangle available= computeAvailableArea(subjectAreaDisplayRelative, monitor.getClientArea(), testAnchor); Rectangle proposed= new Rectangle(upperLeft.x, upperLeft.y, controlSize.x, controlSize.y); @@ -1182,20 +1182,20 @@ bestBounds= available; bestAnchor= testAnchor; } - + testAnchor= getNextFallbackAnchor(testAnchor); } while (testAnchor !is fAnchor && testAnchor !is null); - + // no anchor is perfect - select the one with larges area and set the size to not overlap with the subjectArea if (bestAnchor !is ANCHOR_GLOBAL) Geometry.set(controlSize, Geometry.getSize(bestBounds)); return Geometry.getLocation(bestBounds); } - + /** * Gets the closest monitor given an anchor and the subject area. - * + * * @param area the subject area * @param anchor the anchor * @return the monitor closest to the edge of <code>area</code> defined by @@ -1215,7 +1215,7 @@ * Copied from dwtx.jface.window.Window. Returns the monitor whose client area contains * the given point. If no monitor contains the point, returns the monitor that is closest to the * point. If this is ever made public, it should be moved into a separate utility class. - * + * * @param display the display to search for monitors * @param rectangle the rectangle to find the closest monitor for (display coordinates) * @return the monitor closest to the given point @@ -1297,7 +1297,7 @@ (cast(InformationControlReplacer) this).showInformationControl(subjectArea, information); return; } - + IInformationControl informationControl= getInformationControl(); if (informationControl !is null) { @@ -1350,14 +1350,14 @@ size= Geometry.getSize(controlBounds); informationControl.setLocation(location); informationControl.setSize(size.x, size.y); - + showInformationControl(subjectArea); } } /** * Crops the given bounds such that they lie completely on the closest monitor. - * + * * @param bounds shell bounds to crop * @since 3.4 */ @@ -1398,7 +1398,7 @@ * Replaces this manager's information control as defined by * the information control replacer. * <strong>Must only be called when {@link #fInformationControl} instanceof {@link IInformationControlExtension3}!</strong> - * + * * @param takeFocus <code>true</code> iff the replacing information control should take focus * * @since 3.4 @@ -1414,7 +1414,7 @@ } hideInformationControl(); } - + /** * Disposes this manager's information control. */ @@ -1436,12 +1436,12 @@ setEnabled(false); disposeInformationControl(); - + if (fInformationControlReplacer !is null) { fInformationControlReplacer.dispose(); fInformationControlReplacer= null; } - + if (fSubjectControl !is null && !fSubjectControl.isDisposed() && fSubjectControlDisposeListener !is null) fSubjectControl.removeDisposeListener(fSubjectControlDisposeListener); fSubjectControl= null; @@ -1567,7 +1567,7 @@ * Returns an adapter that gives access to internal methods. * <p> * <strong>Note:</strong> This method is not intended to be referenced or overridden by clients.</p> - * + * * @return the replaceable information control accessor * @since 3.4 * @noreference This method is not intended to be referenced by clients.