# HG changeset patch # User Frank Benoit # Date 1219605928 -7200 # Node ID ea8dd2e11034cbcb0c6b9f80d0c0ed0c0d2bb6f0 # Parent 26688fec6d23afea73245824adb0fa833f35087d instanceof and throws diff -r 26688fec6d23 -r ea8dd2e11034 dwtx/jface/text/IDocument.d --- a/dwtx/jface/text/IDocument.d Sun Aug 24 03:23:46 2008 +0200 +++ b/dwtx/jface/text/IDocument.d Sun Aug 24 21:25:28 2008 +0200 @@ -445,7 +445,7 @@ * @throws BadLocationException if position describes an invalid range in this document * @throws BadPositionCategoryException if the category is undefined in this document */ - void addPosition(String category, Position position) throws BadLocationException, BadPositionCategoryException; + void addPosition(String category, Position position); /** * Removes the given position from the specified position category. @@ -492,7 +492,7 @@ * @exception BadLocationException if offset is invalid in this document * @exception BadPositionCategoryException if category is undefined in this document */ - int computeIndexInCategory(String category, int offset) throws BadLocationException, BadPositionCategoryException; + int computeIndexInCategory(String category, int offset); /** * Appends a new position updater to the document's list of position updaters. diff -r 26688fec6d23 -r ea8dd2e11034 dwtx/jface/text/IDocumentExtension3.d --- a/dwtx/jface/text/IDocumentExtension3.d Sun Aug 24 03:23:46 2008 +0200 +++ b/dwtx/jface/text/IDocumentExtension3.d Sun Aug 24 21:25:28 2008 +0200 @@ -226,7 +226,7 @@ * @exception BadLocationException if offset is invalid in this document * @exception BadPartitioningException if partitioning is invalid for this document */ - String getContentType(String partitioning, int offset, bool preferOpenPartitions) throws BadLocationException, BadPartitioningException; + String getContentType(String partitioning, int offset, bool preferOpenPartitions); /** * Returns the document partition of the given partitioning in which the @@ -252,7 +252,7 @@ * @exception BadLocationException if offset is invalid in this document * @exception BadPartitioningException if partitioning is invalid for this document */ - ITypedRegion getPartition(String partitioning, int offset, bool preferOpenPartitions) throws BadLocationException, BadPartitioningException; + ITypedRegion getPartition(String partitioning, int offset, bool preferOpenPartitions); /** * Computes the partitioning of the given document range based on the given @@ -277,7 +277,7 @@ * @exception BadLocationException if the range is invalid in this document$ * @exception BadPartitioningException if partitioning is invalid for this document */ - ITypedRegion[] computePartitioning(String partitioning, int offset, int length, bool includeZeroLengthPartitions) throws BadLocationException, BadPartitioningException; + ITypedRegion[] computePartitioning(String partitioning, int offset, int length, bool includeZeroLengthPartitions); /** * Sets this document's partitioner. The caller of this method is responsible for diff -r 26688fec6d23 -r ea8dd2e11034 dwtx/jface/text/IFindReplaceTargetExtension.d --- a/dwtx/jface/text/IFindReplaceTargetExtension.d Sun Aug 24 03:23:46 2008 +0200 +++ b/dwtx/jface/text/IFindReplaceTargetExtension.d Sun Aug 24 21:25:28 2008 +0200 @@ -205,7 +205,7 @@ * * @param scope the find scope of the target, may be null */ - void setScope(IRegion scope); + void setScope(IRegion scope_); /** * Returns the currently selected range of lines as a offset and length. diff -r 26688fec6d23 -r ea8dd2e11034 dwtx/jface/text/source/ContentAssistantFacade.d --- a/dwtx/jface/text/source/ContentAssistantFacade.d Sun Aug 24 03:23:46 2008 +0200 +++ b/dwtx/jface/text/source/ContentAssistantFacade.d Sun Aug 24 21:25:28 2008 +0200 @@ -92,7 +92,7 @@ *

* The offered API access can grow over time. *

- * + * * @since 3.4 */ public final class ContentAssistantFacade { @@ -101,11 +101,11 @@ /** * Creates a new facade. - * + * * @param contentAssistant the content assistant which implements {@link IContentAssistantExtension2} and {@link IContentAssistantExtension4} */ public this(IContentAssistant contentAssistant) { - Assert.isLegal(contentAssistant instanceof IContentAssistantExtension4 && contentAssistant instanceof IContentAssistantExtension4); + Assert.isLegal(cast(IContentAssistantExtension4)contentAssistant && cast(IContentAssistantExtension4)contentAssistant ); fContentAssistant= contentAssistant; } @@ -115,7 +115,7 @@ * The same handler instance will be returned when called a more than once * with the same command identifier. *

- * + * * @param commandId the command identifier * @return the handler for the given command identifier * @throws IllegalArgumentException if the command is not supported by this @@ -132,7 +132,7 @@ /** * Adds a completion listener that will be informed before proposals are * computed. - * + * * @param listener the listener * @throws IllegalStateException if called when the content assistant is * uninstalled @@ -145,7 +145,7 @@ /** * Removes a completion listener. - * + * * @param listener the listener to remove * @throws IllegalStateException if called when the content assistant is * uninstalled diff -r 26688fec6d23 -r ea8dd2e11034 dwtx/jface/text/source/LineChangeHover.d --- a/dwtx/jface/text/source/LineChangeHover.d Sun Aug 24 03:23:46 2008 +0200 +++ b/dwtx/jface/text/source/LineChangeHover.d Sun Aug 24 21:25:28 2008 +0200 @@ -245,7 +245,7 @@ model= diffModel; } if ( cast(ILineDiffer)model ) { - if (model instanceof ILineDifferExtension2 && (cast(ILineDifferExtension2)model).isSuspended()) + if (cast(ILineDifferExtension2)model && (cast(ILineDifferExtension2)model).isSuspended()) return null; return cast(ILineDiffer)model; } diff -r 26688fec6d23 -r ea8dd2e11034 dwtx/jface/text/templates/TemplateContext.d --- a/dwtx/jface/text/templates/TemplateContext.d Sun Aug 24 03:23:46 2008 +0200 +++ b/dwtx/jface/text/templates/TemplateContext.d Sun Aug 24 21:25:28 2008 +0200 @@ -126,7 +126,7 @@ * @throws BadLocationException if evaluation fails due to concurrently changed documents etc. * @throws TemplateException if the template specification is not valid */ - public abstract TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException; + public abstract TemplateBuffer evaluate(Template template); /** * Tests if the specified template can be evaluated in this context.