Merge branch 'features/JAL-2284_export-biojsmsa-via-cli' into develop
[jalview.git] / src / jalview / io / BioJsHTMLOutput.java
index f8fa1f5..817f75c 100644 (file)
@@ -80,12 +80,15 @@ public class BioJsHTMLOutput
     }
   }
 
-  public void exportJalviewAlignmentAsBioJsHtmlFile()
+  public void exportJalviewAlignmentAsBioJsHtmlFile(String outputFile)
   {
-    String outputFile = null;
+    // String outputFile = null;
     try
     {
-      outputFile = getOutputFile();
+      if (outputFile == null)
+      {
+        outputFile = getOutputFile();
+      }
       AlignExportSettingI exportSettings = new AlignExportSettingI()
       {
         @Override
@@ -159,8 +162,11 @@ public class BioJsHTMLOutput
       new OOMWarning("Creating Image for " + outputFile, err);
     } catch (Exception e)
     {
+      if (pIndicator != null && !headless)
+      {
       pIndicator.setProgressBar(MessageManager.formatMessage(
               "info.error_creating_file", "HTML"), pSessionId);
+      }
       e.printStackTrace();
     }
   }