X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=2b935ed9590fdd1c9e19724337a8d1b3864c0e3b;hb=52e125bdf62f520d88a7aff8e6d9afe007dee15c;hp=e7fc917226043235f067edde85f121bc635a90ab;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index e7fc917..2b935ed 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -81,8 +81,9 @@ public class Jalview + 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"); + System.setProperty("com.apple.mrj.application.apple.menu.about.name", + "Jalview"); + System.setProperty("apple.laf.useScreenMenuBar", "true"); } ArgsParser aparser = new ArgsParser(args); @@ -247,7 +248,7 @@ public class Jalview { try { - String viprotocol = Jalview.checkProtocol(vamsasImport); + String viprotocol = jalview.io.AppletFormatAdapter.checkProtocol(vamsasImport); if (viprotocol == jalview.io.FormatAdapter.FILE) { inSession = desktop.vamsasImport(new File(vamsasImport)); @@ -332,7 +333,7 @@ public class Jalview } } - protocol = checkProtocol(file); + protocol = jalview.io.AppletFormatAdapter.checkProtocol(file); format = new jalview.io.IdentifyFile().Identify(file, protocol); @@ -368,20 +369,20 @@ public class Jalview data = aparser.getValue("groups", true); if (data != null) { - af.parseFeaturesFile(data, checkProtocol(data)); + af.parseFeaturesFile(data, jalview.io.AppletFormatAdapter.checkProtocol(data)); System.out.println("Added " + data); } data = aparser.getValue("features", true); if (data != null) { - af.parseFeaturesFile(data, checkProtocol(data)); + af.parseFeaturesFile(data, jalview.io.AppletFormatAdapter.checkProtocol(data)); System.out.println("Added " + data); } data = aparser.getValue("annotations", true); if (data != null) { - af.loadJalviewDataFile(data); + af.loadJalviewDataFile(data, null, null, null); System.out.println("Added " + data); } // set or clear the sortbytree flag. @@ -399,7 +400,7 @@ public class Jalview jalview.io.NewickFile fin = null; try { - fin = new jalview.io.NewickFile(data, checkProtocol(data)); + fin = new jalview.io.NewickFile(data, jalview.io.AppletFormatAdapter.checkProtocol(data)); if (fin != null) { af.getViewport().setCurrentTree( @@ -553,7 +554,7 @@ public class Jalview } } // and finally, turn off batch mode indicator - if the desktop still exists - if (desktop!=null) + if (desktop != null) { desktop.setInBatchMode(false); } @@ -790,17 +791,6 @@ public class Jalview } return ff; } - - private static String checkProtocol(String file) - { - String protocol = jalview.io.FormatAdapter.FILE; - - if (file.indexOf("http:") > -1 || file.indexOf("file:") > -1) - { - protocol = jalview.io.FormatAdapter.URL; - } - return protocol; - } } /**