JAL-2629 add ability to select hmmer binaries folder
[jalview.git] / src / jalview / bin / Jalview.java
index c52b562..76f9958 100755 (executable)
@@ -20,9 +20,6 @@
  */
 package jalview.bin;
 
-import groovy.lang.Binding;
-import groovy.util.GroovyScriptEngine;
-
 import jalview.ext.so.SequenceOntology;
 import jalview.gui.AlignFrame;
 import jalview.gui.Desktop;
@@ -40,7 +37,6 @@ import jalview.io.NewickFile;
 import jalview.io.gff.SequenceOntologyFactory;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.ColourSchemeProperty;
-import jalview.schemes.UserColourScheme;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.ws.jws2.Jws2Discoverer;
@@ -67,6 +63,9 @@ import java.util.Vector;
 
 import javax.swing.UIManager;
 
+import groovy.lang.Binding;
+import groovy.util.GroovyScriptEngine;
+
 /**
  * Main class for Jalview Application <br>
  * <br>
@@ -176,8 +175,11 @@ public class Jalview
    * 
    * @param args
    *          open <em>filename</em>
+   * @throws InterruptedException
+   * @throws IOException
    */
   public static void main(String[] args)
+          throws IOException, InterruptedException
   {
     instance = new Jalview();
     instance.doMain(args);
@@ -185,8 +187,10 @@ public class Jalview
 
   /**
    * @param args
+   * @throws InterruptedException
+   * @throws IOException
    */
-  void doMain(String[] args)
+  void doMain(String[] args) throws IOException, InterruptedException
   {
     System.setSecurityManager(null);
     System.out.println("Java version: "
@@ -514,13 +518,7 @@ public class Jalview
           ColourSchemeI cs = ColourSchemeProperty.getColourScheme(af
                   .getViewport().getAlignment(), data);
 
-          if (cs == null)
-          {
-            UserColourScheme ucs = new UserColourScheme("white");
-            ucs.parseAppletParameter(data);
-            cs = ucs;
-          }
-          else
+          if (cs != null)
           {
             System.out.println("CMD [-color " + data
                     + "] executed successfully!");
@@ -585,18 +583,14 @@ public class Jalview
         data = aparser.getValue("tree", true);
         if (data != null)
         {
-          jalview.io.NewickFile fin = null;
           try
           {
             System.out.println("CMD [-tree " + data
                     + "] executed successfully!");
-            fin = new NewickFile(data,
+            NewickFile nf = new NewickFile(data,
                     AppletFormatAdapter.checkProtocol(data));
-            if (fin != null)
-            {
-              af.getViewport().setCurrentTree(
-                      af.ShowNewickTree(fin, data).getTree());
-            }
+            af.getViewport().setCurrentTree(
+                    af.showNewickTree(nf, data).getTree());
           } catch (IOException ex)
           {
             System.err.println("Couldn't add tree " + data);
@@ -979,7 +973,7 @@ public class Jalview
     }
     try
     {
-      Map<String, Object> vbinding = new HashMap<String, Object>();
+      Map<String, Object> vbinding = new HashMap<>();
       vbinding.put("Jalview", this);
       if (af != null)
       {
@@ -1046,7 +1040,7 @@ public class Jalview
                         + nickname + "|" + url);
         if (source == null)
         {
-          source = new Vector<String>();
+          source = new Vector<>();
         }
         source.addElement(nickname);
       }
@@ -1064,7 +1058,7 @@ public class Jalview
       System.out.println("adding source '" + data + "'");
       if (source == null)
       {
-        source = new Vector<String>();
+        source = new Vector<>();
       }
       source.addElement(data);
     }