diff dwtx/jface/operation/ModalContext.d @ 71:4878bef4a38e

Some fixing
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 04:03:58 +0200
parents 46a6e0e6ccd4
children 5df4896124c7
line wrap: on
line diff
--- a/dwtx/jface/operation/ModalContext.d	Thu May 22 01:36:46 2008 +0200
+++ b/dwtx/jface/operation/ModalContext.d	Thu May 22 04:03:58 2008 +0200
@@ -144,9 +144,9 @@
             } finally {
                 // notify the operation of change of thread of control
                 if ( auto tl = cast(IThreadListener)runnable ) {
-                    auto exception = 
+                    auto exception =
                         invokeThreadListener(tl, callingThread);
-                    
+
                     //Forward it if we don't already have one
                     if(exception !is null && throwable is null)
                         throwable = exception;
@@ -215,7 +215,7 @@
     /**
      * Returns whether the first progress monitor is the same as, or a wrapper
      * around, the second progress monitor.
-     * 
+     *
      * @param monitor1
      *            the first progress monitor
      * @param monitor2
@@ -249,14 +249,14 @@
      * </p>
      * <p>
      * Convenience for:
-     * 
+     *
      * <pre>
      * if (monitor.isCanceled())
      *  throw new InterruptedException();
      * </pre>
-     * 
+     *
      * </p>
-     * 
+     *
      * @param monitor
      *            the progress monitor
      * @exception InterruptedException
@@ -288,7 +288,7 @@
      * <code>ModalContext.run</code> method is called within the dynamic scope
      * of another call to <code>ModalContext.run</code>.
      * </p>
-     * 
+     *
      * @return the modal nesting level, or <code>0</code> if this method is
      *         called outside the dynamic scope of any invocation of
      *         <code>ModalContext.run</code>
@@ -326,7 +326,7 @@
      * an opportunity to transfer any thread-local state to the execution thread
      * before control is transferred to the new thread.
      * </p>
-     * 
+     *
      * @param operation
      *            the runnable to run
      * @param fork
@@ -373,7 +373,7 @@
                     if ( auto tl = cast(IThreadListener)operation ) {
                         listenerException = invokeThreadListener(tl, t);
                     }
-                    
+
                     if(listenerException is null){
                         t.start();
                         t.block();
@@ -420,12 +420,12 @@
     /**
      * Invoke the ThreadListener if there are any errors or RuntimeExceptions
      * return them.
-     * 
+     *
      * @param listener
      * @param switchingThread
      *            the {@link Thread} being switched to
      */
-    static Throwable invokeThreadListener(IThreadListener listener,
+    static Exception invokeThreadListener(IThreadListener listener,
             Thread switchingThread) {
         try {
             listener.threadChange(switchingThread);
@@ -472,7 +472,7 @@
 
     /**
      * Sets whether ModalContext is running in debug mode.
-     * 
+     *
      * @param debugMode
      *            <code>true</code> for debug mode, and <code>false</code>
      *            for normal mode (the default)
@@ -486,7 +486,7 @@
      * <code>Display.readAndDispatch()</code>) while running operations. By
      * default, ModalContext will process events while running operations. Use
      * this method to disallow event processing temporarily.
-     * 
+     *
      * @param allowReadAndDispatch
      *            <code>true</code> (the default) if events may be processed
      *            while running an operation, <code>false</code> if