JAL-3210 Barebones gradle/buildship/eclipse. See README
[jalview.git] / src / jalview / analysis / scoremodels / ScoreModels.java
index fd579dc..ebc9a26 100644 (file)
@@ -25,7 +25,6 @@ import jalview.api.analysis.ScoreModelI;
 import jalview.io.DataSourceType;
 import jalview.io.FileParse;
 import jalview.io.ScoreMatrixFile;
-import jalview.util.Platform;
 
 import java.io.IOException;
 import java.util.LinkedHashMap;
@@ -44,6 +43,8 @@ public class ScoreModels
 
   private static ScoreModels instance;
 
+  private Map<String, ScoreModelI> models;
+
   /**
    * Answers the singleton instance of this class, with lazy initialisation
    * (built-in score models are loaded on the first call to this method)
@@ -52,37 +53,13 @@ public class ScoreModels
    */
   public static ScoreModels getInstance()
   {
-    ScoreModels m = instance;
-    @SuppressWarnings("unused")
-    ThreadGroup g = null;
-    if (Platform.isJS())
+    if (instance == null)
     {
-      g = Thread.currentThread().getThreadGroup();
-      /**
-       * @j2sNative m = g._jalviewScoreModelsInstance;
-       * 
-       */
+      instance = new ScoreModels();
     }
-    if (m == null)
-    {
-      m = new ScoreModels();
-      if (Platform.isJS())
-      {
-        /**
-         * @j2sNative g._jalviewScoreModelsInstance = m;
-         * 
-         */
-      }
-      else
-      {
-        instance = m;
-      }
-    }
-    return m;
+    return instance;
   }
 
-  private Map<String, ScoreModelI> models;
-
   /**
    * Private constructor to enforce use of singleton. Registers Jalview's
    * "built-in" score models: