From: gmungoc Date: Fri, 25 May 2018 08:13:00 +0000 (+0100) Subject: JAL-2994 temporary patch with paths to Chimera for Windows X-Git-Tag: Release_2_10_5~69^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a4be3ff77b3f97c6dd124a73c89e293f6105709b;p=jalview.git JAL-2994 temporary patch with paths to Chimera for Windows --- diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java index effe556..bf58705 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/StructureManager.java @@ -97,7 +97,7 @@ public class StructureManager this.haveGUI = haveGUI; // Create the Chimera interface chimeraManager = new ChimeraManager(this); - chimSelectionList = new ArrayList(); + chimSelectionList = new ArrayList<>(); pathProps = new Properties(); } @@ -110,7 +110,7 @@ public class StructureManager ModelType type) { // new models - Map> newModels = new HashMap>(); + Map> newModels = new HashMap<>(); if (chimObjNames.size() > 0) { List names = chimObjNames.iterator().next(); @@ -846,7 +846,7 @@ public class StructureManager // alDialog.dispose(); // } // System.out.println("launch align dialog"); - List chimObjectList = new ArrayList(); + List chimObjectList = new ArrayList<>(); for (ChimeraModel model : chimeraManager.getChimeraModels()) { if (useChains) @@ -887,7 +887,7 @@ public class StructureManager public List getAllChimeraResidueAttributes() { - List attributes = new ArrayList(); + List attributes = new ArrayList<>(); // attributes.addAll(rinManager.getResAttrs()); attributes.addAll(chimeraManager.getAttrList()); return attributes; @@ -898,7 +898,7 @@ public class StructureManager // TODO: [Optional] Change priority of Chimera paths public static List getChimeraPaths() { - List pathList = new ArrayList(); + List pathList = new ArrayList<>(); // if no network is available and the settings have been modified by the // user, check for a @@ -934,8 +934,18 @@ public class StructureManager } else if (os.startsWith("Windows")) { - pathList.add("\\Program Files\\Chimera\\bin\\chimera"); - pathList.add("C:\\Program Files\\Chimera\\bin\\chimera.exe"); + for (String root : new String[] { "\\Program Files", + "C:\\Program Files", "\\Program Files (x86)", + "C:\\Program Files (x86)" }) + { + for (String version : new String[] { "1.11", "1.11.1", "1.11.2", + "1.12", "1.13" }) + { + pathList.add(root + "\\Chimera " + version + "\\bin\\chimera"); + pathList.add( + root + "\\Chimera " + version + "\\bin\\chimera.exe"); + } + } } else if (os.startsWith("Mac")) {