X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=02e53ecf395534900bf2792fbccec1e51dfa3dd6;hb=bb1629fd423f5ce90ca1a951f10e9183fbbbc8d0;hp=cd7d1af2e82009f1f5e52137250b4facab8bc9bf;hpb=1cb8662ae0ce8b7c29fa510809a6e883c769dcdc;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index cd7d1af..02e53ec 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -64,6 +64,8 @@ import java.util.Vector; import javax.swing.LookAndFeel; import javax.swing.UIManager; +import com.threerings.getdown.util.LaunchUtil; + import groovy.lang.Binding; import groovy.util.GroovyScriptEngine; @@ -122,8 +124,8 @@ public class Jalview class FeatureFetcher { /* - * TODO: generalise to track all jalview events to orchestrate batch - * processing events. + * TODO: generalise to track all jalview events to orchestrate batch processing + * events. */ private int queued = 0; @@ -181,7 +183,7 @@ public class Jalview * main class for Jalview application * * @param args - * open filename + * open filename */ public static void main(String[] args) { @@ -200,6 +202,8 @@ public class Jalview System.out.println(System.getProperty("os.arch") + " " + System.getProperty("os.name") + " " + System.getProperty("os.version")); + // report Jalview version + Cache.loadBuildProperties(true); ArgsParser aparser = new ArgsParser(args); boolean headless = false; @@ -304,8 +308,9 @@ public class Jalview "Failed to set QuaQua look and feel: " + e.toString()); } } - if (lookAndFeel == null || !(lookAndFeel.getClass() - .isAssignableFrom(UIManager.getLookAndFeel().getClass())) + if (lookAndFeel == null + || !(lookAndFeel.getClass().isAssignableFrom( + UIManager.getLookAndFeel().getClass())) || !UIManager.getLookAndFeel().getClass().toString() .toLowerCase().contains("quaqua")) { @@ -323,10 +328,10 @@ public class Jalview } /* - * configure 'full' SO model if preferences say to, - * else use the default (SO Lite) + * configure 'full' SO model if preferences say to, else use the default (SO + * Lite) */ - if (Cache.getDefault("USE_FULL_SO", false)) + if (Cache.getDefault("USE_FULL_SO", true)) { SequenceOntologyFactory.setInstance(new SequenceOntology()); } @@ -335,6 +340,20 @@ public class Jalview { desktop = new Desktop(); desktop.setInBatchMode(true); // indicate we are starting up + + try + { + JalviewTaskbar.setTaskbar(this); + } catch (Exception e) + { + System.out.println("Cannot set Taskbar"); + // e.printStackTrace(); + } catch (Throwable t) + { + System.out.println("Cannot set Taskbar"); + // t.printStackTrace(); + } + desktop.setVisible(true); desktop.startServiceDiscovery(); if (!aparser.contains("nousagestats")) @@ -387,6 +406,25 @@ public class Jalview BioJsHTMLOutput.updateBioJS(); } + // Move any new getdown-launcher-new.jar into place over old + // getdown-launcher.jar + String appdirString = System.getProperty("getdownappdir"); + if (appdirString != null && appdirString.length() > 0) + { + final File appdir = new File(appdirString); + new Thread() + { + @Override + public void run() + { + LaunchUtil.upgradeGetdown( + new File(appdir, "getdown-launcher-old.jar"), + new File(appdir, "getdown-launcher.jar"), + new File(appdir, "getdown-launcher-new.jar")); + } + }.start(); + } + String file = null, data = null; FileFormatI format = null; DataSourceType protocol = null; @@ -537,8 +575,8 @@ public class Jalview { data.replaceAll("%20", " "); - ColourSchemeI cs = ColourSchemeProperty - .getColourScheme(af.getViewport().getAlignment(), data); + ColourSchemeI cs = ColourSchemeProperty.getColourScheme( + af.getViewport(), af.getViewport().getAlignment(), data); if (cs != null) { @@ -828,9 +866,6 @@ public class Jalview // (quote the 'PROPERTY=VALUE' pair to ensure spaces are // passed in correctly)" + "-jabaws URL\tSpecify URL for Jabaws services (e.g. for a local installation).\n" - + "-dasserver nickname=URL\tAdd and enable a das server with given nickname\n\t\t\t(alphanumeric or underscores only) for retrieval of features for all alignments.\n" - + "\t\t\tSources that also support the sequence command may be specified by prepending the URL with sequence:\n" - + "\t\t\t e.g. sequence:http://localdas.somewhere.org/das/source)\n" + "-fetchfrom nickname\tQuery nickname for features for the alignments and display them.\n" // + // "-vdoc vamsas-document\tImport vamsas document into new @@ -875,10 +910,10 @@ public class Jalview * Locate the given string as a file and pass it to the groovy interpreter. * * @param groovyscript - * the script to execute + * the script to execute * @param jalviewContext - * the Jalview Desktop object passed in to the groovy binding as the - * 'Jalview' object. + * the Jalview Desktop object passed in to the groovy + * binding as the 'Jalview' object. */ private void executeGroovyScript(String groovyscript, AlignFrame af) { @@ -965,7 +1000,7 @@ public class Jalview } try { - Map vbinding = new HashMap<>(); + Map vbinding = new HashMap<>(); vbinding.put("Jalview", this); if (af != null) { @@ -1007,8 +1042,8 @@ public class Jalview } /** - * Quit method delegates to Desktop.quit - unless running in headless mode - * when it just ends the JVM + * Quit method delegates to Desktop.quit - unless running in headless mode when + * it just ends the JVM */ public void quit() {