JAL-629 Much better way of dealing with list of filenames/URLs without an --open...
[jalview.git] / src / jalview / gui / AlignFrame.java
index 99881e6..eb98d98 100644 (file)
@@ -830,7 +830,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
               @Override
               public void propertyChange(PropertyChangeEvent evt)
               {
-                // // jalview.bin.Console.outPrintln("Discoverer property change.");
+                // // jalview.bin.Console.outPrintln("Discoverer property
+                // change.");
                 // if (evt.getPropertyName().equals("services"))
                 {
                   SwingUtilities.invokeLater(new Runnable()
@@ -1331,9 +1332,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
           out.print(output);
           out.flush();
-          Console.trace("ALIGNFRAME about to close file");
-          out.close();
-          Console.trace("ALIGNFRAME closed file");
+          if (!stdout)
+          {
+            Console.trace("ALIGNFRAME about to close file");
+            out.close();
+            Console.trace("ALIGNFRAME closed file");
+          }
           AlignFrame.this.setTitle(stdout ? "STDOUT" : file);
           if (stdout)
           {
@@ -4343,7 +4347,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     {
       try
       {
-        jalview.bin.Console.errPrintln("Waiting for building menu to finish.");
+        jalview.bin.Console
+                .errPrintln("Waiting for building menu to finish.");
         Thread.sleep(10);
       } catch (Exception e)
       {
@@ -5961,7 +5966,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     }
     else
     {
-      jalview.bin.Console.errPrintln("Can't run Groovy script as console not found");
+      jalview.bin.Console
+              .errPrintln("Can't run Groovy script as console not found");
     }
   }