X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=76f9958edbff61d13ed65164149cfde6fd439c28;hb=bb7c8e1f39eca07ec0bc544df298ee58f109b011;hp=39c0a5bfb4b306a15b518a5c72404b5fb25fbeca;hpb=7d67fb613ec026dc9a265e351e7fab542e3f1d61;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 39c0a5b..76f9958 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -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
*
@@ -176,8 +175,11 @@ public class Jalview * * @param args * open filename + * @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: " @@ -511,16 +515,10 @@ public class Jalview { data.replaceAll("%20", " "); - ColourSchemeI cs = ColourSchemeProperty.getColour(af + 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 vbinding = new HashMap(); + Map 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(); + 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(); + source = new Vector<>(); } source.addElement(data); }