Merge branch 'develop' into features/JAL-653_gffalignments
[jalview.git] / src / jalview / bin / Jalview.java
index 142e7fc..00a042d 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 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.
  * 
@@ -22,6 +22,7 @@ package jalview.bin;
 
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
+import jalview.io.BioJsHTMLOutput;
 import jalview.io.HtmlSvgOutput;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
@@ -45,7 +46,7 @@ import java.security.CodeSource;
 import java.security.PermissionCollection;
 import java.security.Permissions;
 import java.security.Policy;
-import java.util.Hashtable;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Vector;
 
@@ -93,23 +94,6 @@ public class Jalview
     System.out.println(System.getProperty("os.arch") + " "
             + System.getProperty("os.name") + " "
             + System.getProperty("os.version"));
-    // if (new Platform().isAMac())
-    // {
-    // // System.setProperty("com.apple.mrj.application.apple.menu.about.name",
-    // // "Jalview");
-    // // System.setProperty("apple.laf.useScreenMenuBar", "true");
-    // try
-    // {
-    // UIManager.setLookAndFeel(ch.randelshofer.quaqua.QuaquaManager
-    // .getLookAndFeel());
-    // System.out
-    // .println("--------------------------------------------> in here");
-    // } catch (UnsupportedLookAndFeelException e)
-    // {
-    // // TODO Auto-generated catch block
-    // e.printStackTrace();
-    // }
-    // }
 
     ArgsParser aparser = new ArgsParser(args);
     boolean headless = false;
@@ -241,6 +225,8 @@ public class Jalview
       desktop.checkForNews();
     }
 
+    BioJsHTMLOutput.updateBioJS();
+
     String file = null, protocol = null, format = null, data = null;
     jalview.io.FileLoader fileLoader = new jalview.io.FileLoader();
     Vector getFeatures = null; // vector of das source nicknames to fetch
@@ -820,7 +806,7 @@ public class Jalview
        * = new Binding(); binding.setVariable("input", "world");
        * gse.run("hello.groovy", binding); </code>
        */
-      Class[] bspec;
+      Class<?>[] bspec;
       Object[] binding;
       int blen = ((jalviewContext[0] == null) ? 0 : 1)
               + ((jalviewContext[1] == null) ? 0 : 1);
@@ -830,7 +816,7 @@ public class Jalview
       binding = new Object[blen * 2];
       blen = 0;
       ClassLoader cl = null;
-      Map vbinding = new Hashtable();
+      Map<String, Object> vbinding = new HashMap<String, Object>();
       for (int jc = 0; jc < jalviewContext.length; jc++)
       {
         if (jalviewContext[jc] != null)
@@ -847,8 +833,8 @@ public class Jalview
           blen++;
         }
       }
-      Class gbindingc = cl.loadClass("groovy.lang.Binding");
-      Constructor gbcons;
+      Class<?> gbindingc = cl.loadClass("groovy.lang.Binding");
+      Constructor<?> gbcons;
       Object gbinding;
       try
       {
@@ -858,15 +844,15 @@ public class Jalview
       {
         // old style binding config - using series of string/object values to
         // setVariable.
-        gbcons = gbindingc.getConstructor(null);
-        gbinding = gbcons.newInstance(null);
+        gbcons = gbindingc.getConstructor();
+        gbinding = gbcons.newInstance();
         java.lang.reflect.Method setvar = gbindingc.getMethod(
                 "setVariable", bspec);
         setvar.invoke(gbinding, binding);
       }
-      ;
-      Class gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
-      Constructor gseccons = gsec.getConstructor(new Class[]
+
+      Class<?> gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
+      Constructor<?> gseccons = gsec.getConstructor(new Class[]
       { URL[].class }); // String[].class });
       Object gse = gseccons.newInstance(new Object[]
       { new URL[]
@@ -966,7 +952,7 @@ public class Jalview
   private static FeatureFetcher startFeatureFetching(final Vector dasSources)
   {
     FeatureFetcher ff = new FeatureFetcher();
-    AlignFrame afs[] = Desktop.getAlignframes();
+    AlignFrame afs[] = Desktop.getAlignFrames();
     if (afs == null || afs.length == 0)
     {
       return null;