JAL-629 don’t trash user’s system property file when adjusting settings to process...
authorJames Procter <j.procter@dundee.ac.uk>
Tue, 24 Jan 2023 07:48:07 +0000 (07:48 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Tue, 24 Jan 2023 07:48:07 +0000 (07:48 +0000)
src/jalview/bin/Cache.java
src/jalview/bin/Commands.java

index 370a243..7ff7309 100755 (executable)
@@ -322,6 +322,16 @@ public class Cache
 
   private static boolean propsAreReadOnly = Platform.isJS();
 
+  public static boolean isPropsAreReadOnly()
+  {
+    return propsAreReadOnly;
+  }
+
+  public static void setPropsAreReadOnly(boolean propsAreReadOnly)
+  {
+    Cache.propsAreReadOnly = propsAreReadOnly;
+  }
+
   private final static String JS_PROPERTY_PREFIX = "jalview_";
 
   /**
@@ -1401,10 +1411,11 @@ public class Cache
                 if (customProxySet &&
                 // we have a username but no password for the scheme being
                 // requested
-                (protocol.equalsIgnoreCase("http")
-                        && (httpUser != null && httpUser.length() > 0
-                                && (httpPassword == null
-                                        || httpPassword.length == 0)))
+                        (protocol.equalsIgnoreCase("http")
+                                && (httpUser != null
+                                        && httpUser.length() > 0
+                                        && (httpPassword == null
+                                                || httpPassword.length == 0)))
                         || (protocol.equalsIgnoreCase("https")
                                 && (httpsUser != null
                                         && httpsUser.length() > 0
index 5b3e199..289d962 100644 (file)
@@ -476,6 +476,10 @@ public class Commands
             }
           }
         }
+        // for moment we disable JSON export
+        Cache.setPropsAreReadOnly(true);
+        Cache.setProperty("EXPORT_EMBBED_BIOJSON", "false");
+
         switch (type)
         {
         case "svg":