Merge branch 'alpha/origin_2022_JAL-3066_Jalview_212_slivka-integration' into spike...
authorJim Procter <j.procter@dundee.ac.uk>
Tue, 13 Dec 2022 17:29:01 +0000 (17:29 +0000)
committerJim Procter <j.procter@dundee.ac.uk>
Tue, 13 Dec 2022 17:29:01 +0000 (17:29 +0000)
 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

15 files changed:
1  2 
src/jalview/bin/Cache.java
src/jalview/bin/Jalview.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AnnotationColourChooser.java
src/jalview/gui/AnnotationRowFilter.java
src/jalview/gui/Preferences.java
src/jalview/io/AnnotationFile.java
src/jalview/io/SequenceAnnotationReport.java
src/jalview/jbgui/GPreferences.java
src/jalview/viewmodel/AlignmentViewport.java
src/jalview/ws/jws1/JPredClient.java
src/jalview/ws/jws2/SequenceAnnotationWSClient.java
src/jalview/ws/slivkaws/SlivkaMsaServiceInstance.java
src/jalview/ws/slivkaws/SlivkaWSDiscoverer.java
test/jalview/ws/jabaws/DisorderAnnotExportImport.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()
    {
      }
    };
  
 +  /* build Properties (not all saved to .jalview_properties) */
 +  public static Properties buildProperties = new Properties();
    /** Default file is ~/.jalview_properties */
    static String propertiesFile;
  
        // 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);
          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", ""),
              && (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)
            {
              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");
            }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
   */
  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;
@@@ -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.
@@@ -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;