JAL-1603 if Chimera selected in Preferences, warn if not installed/found
[jalview.git] / src / ext / edu / ucsf / rbvi / strucviz2 / StructureManager.java
index 1208638..4797b37 100644 (file)
@@ -864,22 +864,24 @@ public class StructureManager
   StructureSettings defaultSettings = null;
 
   // TODO: [Optional] Change priority of Chimera paths
-  public List<String> getChimeraPaths()
+  public static List<String> getChimeraPaths()
   {
     List<String> pathList = new ArrayList<String>();
 
     // if no network is available and the settings have been modified by the
     // user, check for a
     // path to chimera
-    if (defaultSettings != null)
-    {
-      String defaultPath = defaultSettings.getChimeraPath();
-      if (defaultPath != null && !defaultPath.equals(""))
-      {
-        pathList.add(defaultPath);
-        return pathList;
-      }
-    }
+    //
+    // For Jalview, Preferences/Cache plays this role instead
+    // if (defaultSettings != null)
+    // {
+    // String defaultPath = defaultSettings.getChimeraPath();
+    // if (defaultPath != null && !defaultPath.equals(""))
+    // {
+    // pathList.add(defaultPath);
+    // return pathList;
+    // }
+    // }
 
     /*
      * Jalview addition: check if path set in user preferences.
@@ -887,7 +889,7 @@ public class StructureManager
     String userPath = Cache.getDefault(Preferences.CHIMERA_PATH, null);
     if (userPath != null)
     {
-      pathList.add(userPath);
+      pathList.add(0, userPath);
     }
 
     // Add default installation paths