JAL-2282 Refactor SequenceAnnotationReport to use refactored UrlLink
[jalview.git] / src / jalview / io / BioJsHTMLOutput.java
index 5c84824..817f75c 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -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();
     }
   }