jruaux      2003/01/13 05:37:26

  Modified:    Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
                        CactusLaunchShortcut.java
  Log:
  Removed progress dialog for stop and undeploy actions
  
  Revision  Changes    Path
  1.21      +30 -25    
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java
  
  Index: CactusLaunchShortcut.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- CactusLaunchShortcut.java 10 Jan 2003 17:51:53 -0000      1.20
  +++ CactusLaunchShortcut.java 13 Jan 2003 13:37:26 -0000      1.21
  @@ -182,6 +182,7 @@
               };
               try
               {
  +                dialog.setCancelable(true);
                   dialog.run(true, true, runnable);
               }
               catch (InvocationTargetException e)
  @@ -240,7 +241,7 @@
                   e.getMessage(),
                   null);
           }
  -
  +        thePM.done();
       }
   
       /**
  @@ -263,6 +264,7 @@
                   e.getMessage(),
                   e.getStatus());
           }
  +        //thePM.done();
       }
       /**
        * @see 
org.eclipse.jdt.internal.junit.runner.ITestRunListener#testRunStarted(int)
  @@ -278,30 +280,33 @@
        */
       public void testRunEnded(long theElapsedTime)
       {
  -        ProgressMonitorDialog dialog =
  -            new ProgressMonitorDialog(getShell());
  -        IRunnableWithProgress runnable = new IRunnableWithProgress()
  -        {
  -            public void run(IProgressMonitor thePM)
  -                throws InterruptedException
  -            {
  -                teardownCactusTests(thePM);
  -            }
  -        };
  -        try
  -        {
  -            dialog.run(true, true, runnable);
  -        }
  -        catch (InvocationTargetException e)
  -        {
  -            e.printStackTrace();
  -            // TODO: handle exception
  -        }
  -        catch (InterruptedException e)
  -        {
  -            e.printStackTrace();
  -            // TODO: handle exception (cancel button ?)
  -        }
  +        // For some reason it's impossible to get the active UI shell
  +        // after the JUnit tests ended.
  +        // The commented code below should be used when this problem
  +        // has been addressed.
  +        teardownCactusTests(null);
  +//        ProgressMonitorDialog dialog =
  +//            new ProgressMonitorDialog(getShell());
  +//        try
  +//        {
  +//            IRunnableWithProgress runnable = new IRunnableWithProgress()
  +//            {
  +//                public void run(IProgressMonitor thePM)
  +//                    throws InterruptedException
  +//                {
  +//                    teardownCactusTests(thePM);
  +//                }
  +//            };
  +//            dialog.run(true, true, runnable);
  +//        }
  +//        catch (InvocationTargetException e)
  +//        {
  +//            // TODO: handle exception
  +//        }
  +//        catch (InterruptedException e)
  +//        {
  +//            // TODO: handle exception (cancel button ?)
  +//        }
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to