From: Jim Procter Date: Tue, 13 Dec 2022 17:29:01 +0000 (+0000) Subject: Merge branch 'alpha/origin_2022_JAL-3066_Jalview_212_slivka-integration' into spike... X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=49db0dff1da16c3355b43a41498c1fc93ef47e91 Merge branch 'alpha/origin_2022_JAL-3066_Jalview_212_slivka-integration' into spike/jims/dec_2022_2112_to_212_JAL-3066_slikva_integration Conflicts: src/jalview/bin/Cache.java src/jalview/ws/jws2/JPredThread.java src/jalview/ws/slivkaws/SlivkaJPredServiceInstance.java src/jalview/ws/slivkaws/SlivkaMsaServiceInstance.java src/jalview/ws/slivkaws/SlivkaWSInstance.java swingjs/ver/3.3.1/SwingJS-site.zip swingjs/ver/3.3.1/timestamp --- 49db0dff1da16c3355b43a41498c1fc93ef47e91 diff --cc src/jalview/bin/Cache.java index 28bab15,3208a36..4e9f391 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@@ -293,28 -280,6 +293,27 @@@ public class Cache implements Applicati */ public static Logger log; + // save the proxy properties set at startup + public final static String[] startupProxyProperties = { + System.getProperty("http.proxyHost"), + System.getProperty("http.proxyPort"), + System.getProperty("https.proxyHost"), + System.getProperty("https.proxyPort"), + System.getProperty("http.proxyUser"), + System.getProperty("http.proxyPassword"), + System.getProperty("https.proxyUser"), + System.getProperty("https.proxyPassword"), + System.getProperty("http.nonProxyHosts") }; + + public final static String PROXYTYPE_NONE = "none"; + + // "false" and "true" for backward compatibility + public final static String PROXYTYPE_SYSTEM = "false"; + + public final static String PROXYTYPE_CUSTOM = "true"; + + // in-memory only storage of proxy password, safer to use char array + public static char[] proxyAuthPassword = null; - /** Jalview Properties */ private Properties applicationProperties = new Properties() { @@@ -326,9 -291,6 +325,8 @@@ } }; + /* build Properties (not all saved to .jalview_properties) */ + public static Properties buildProperties = new Properties(); - /** Default file is ~/.jalview_properties */ static String propertiesFile; @@@ -367,9 -329,8 +365,7 @@@ // lcastor.setLevel(Level.toLevel(Cache.getDefault("logs.Castor.Level", // Level.INFO.toString()))); // we shouldn't need to do this - org.apache.log4j.Logger.getRootLogger() - .setLevel(org.apache.log4j.Level.INFO); - + org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.INFO); - jalview.bin.Cache.log.setLevel(Level.toLevel(Cache .getDefault("logs.Jalview.level", Level.INFO.toString()))); // laxis.addAppender(ap); @@@ -466,8 -409,6 +463,7 @@@ System.out.println("Error reading properties file: " + ex); } } - + /* TO BE REPLACED WITH PROXY_TYPE SETTINGS if (getDefault("USE_PROXY", false)) { String proxyServer = getDefault("PROXY_SERVER", ""), @@@ -567,16 -484,11 +563,13 @@@ && (System.getProperty("java.awt.headless") == null || System .getProperty("java.awt.headless").equals("false"))) { - - new Thread() + class VersionChecker extends Thread { @Override public void run() { + String remoteBuildPropertiesUrl = Cache + .getAppbaseBuildProperties(); - String orgtimeout = System .getProperty("sun.net.client.defaultConnectTimeout"); if (orgtimeout == null) @@@ -590,19 -502,28 +583,18 @@@ { System.setProperty("sun.net.client.defaultConnectTimeout", "5000"); - java.net.URL url = new java.net.URL(Cache - .getDefault("www.jalview.org", "http://www.jalview.org") - + "/webstart/jalview.jnlp"); + java.net.URL url = new java.net.URL(remoteBuildPropertiesUrl); - BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream())); - String line = null; - while ((line = in.readLine()) != null) - { - if (line.indexOf("jalview.version") == -1) - { - continue; - } - line = line.substring(line.indexOf("value=") + 7); - line = line.substring(0, line.lastIndexOf("\"")); - remoteVersion = line; - break; - } + Properties remoteBuildProperties = new Properties(); + remoteBuildProperties.load(in); + remoteVersion = remoteBuildProperties.getProperty("VERSION"); } catch (Exception ex) { - System.out.println( - "Non-fatal exception when checking version at www.jalview.org :"); + System.out + .println("Non-fatal exception when checking version at " + + remoteBuildPropertiesUrl + ":"); System.out.println(ex); remoteVersion = getProperty("VERSION"); } diff --cc src/jalview/ws/jws1/JPredClient.java index 2b133a7,4af83f1..076d71e --- a/src/jalview/ws/jws1/JPredClient.java +++ b/src/jalview/ws/jws1/JPredClient.java @@@ -20,9 -20,8 +20,10 @@@ */ package jalview.ws.jws1; +import java.util.Locale; + import jalview.analysis.AlignSeq; + import jalview.analysis.SeqsetUtils.SequenceInfo; import jalview.bin.Cache; import jalview.datamodel.AlignmentView; import jalview.datamodel.SeqCigar; diff --cc src/jalview/ws/jws2/SequenceAnnotationWSClient.java index 39217bb,aae6f79..a93cfa0 --- a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java +++ b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java @@@ -149,14 -146,18 +149,9 @@@ public class SequenceAnnotationWSClien startSeqAnnotationWorker(sh, alignFrame, preset_, editParams); } }); - - if (!processParams(sh, editParams, true).toCompletableFuture().join()) - { - return; - } } } - else - { - startSeqAnnotationWorker(sh, alignFrame, preset, editParams); - } - } - - private void startSeqAnnotationWorker(ServiceWithParameters sh, - AlignFrame alignFrame, WsParamSetI preset, boolean editParams) - { - if (!sh.isInteractiveUpdate()) + if (sh.action.toLowerCase(Locale.ROOT).contains("disorder")) { // build IUPred style client. take sequences, returns annotation per // sequence. diff --cc src/jalview/ws/slivkaws/SlivkaMsaServiceInstance.java index 9a33b04,b992fbe..374d2eb --- a/src/jalview/ws/slivkaws/SlivkaMsaServiceInstance.java +++ b/src/jalview/ws/slivkaws/SlivkaMsaServiceInstance.java @@@ -1,5 -1,6 +1,6 @@@ package jalview.ws.slivkaws; -import jalview.bin.Cache; ++ import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; import jalview.io.DataSourceType; @@@ -10,7 -11,7 +11,6 @@@ import jalview.ws.api.MultipleSequenceA import jalview.ws.params.ArgumentI; import jalview.ws.params.InvalidArgumentException; import jalview.ws.params.WsParamSetI; -- import java.io.IOError; import java.io.IOException; import java.rmi.ServerError;