diff dwtx/jface/text/source/ContentAssistantFacade.d @ 141:ea8dd2e11034

instanceof and throws
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 21:25:28 +0200
parents 51e6e63f930e
children
line wrap: on
line diff
--- 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