Mercurial > projects > dwt-addons
changeset 141:ea8dd2e11034
instanceof and throws
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 21:25:28 +0200 |
parents | 26688fec6d23 |
children | 893c017bcdc5 |
files | dwtx/jface/text/IDocument.d dwtx/jface/text/IDocumentExtension3.d dwtx/jface/text/IFindReplaceTargetExtension.d dwtx/jface/text/source/ContentAssistantFacade.d dwtx/jface/text/source/LineChangeHover.d dwtx/jface/text/templates/TemplateContext.d |
diffstat | 6 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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
--- 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 <code>null</code> */ - void setScope(IRegion scope); + void setScope(IRegion scope_); /** * Returns the currently selected range of lines as a offset and length.
--- 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 @@ * <p> * The offered API access can grow over time. * </p> - * + * * @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. * </p> - * + * * @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
--- 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; }
--- 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.