JAL-3253 preliminary static fixes for JavaScript part 3 of 3
[jalview.git] / src / jalview / urls / IdOrgSettings.java
index 7dd1a19..4d42e0b 100644 (file)
@@ -21,6 +21,8 @@
 
 package jalview.urls;
 
+import jalview.bin.Jalview;
+
 /**
  * Holds settings for identifiers.org e.g. url, download location
  * 
@@ -29,27 +31,33 @@ package jalview.urls;
  */
 public class IdOrgSettings
 {
-  private static String url;
+  private String url;
+  private String location;
 
-  private static String location;
+  public static IdOrgSettings getInstance()
+  {
+    Jalview j = Jalview.getInstance();
+    return (j.idOrgSettings == null ? j.idOrgSettings = new IdOrgSettings()
+            : j.idOrgSettings);
+  }
 
   public static void setUrl(String seturl)
   {
-    url = seturl;
+    getInstance().url = seturl;
   }
 
   public static void setDownloadLocation(String setloc)
   {
-    location = setloc;
+    getInstance().location = setloc;
   }
 
   public static String getUrl()
   {
-    return url;
+    return getInstance().url;
   }
 
   public static String getDownloadLocation()
   {
-    return location;
+    return getInstance().location;
   }
 }