From a4be3ff77b3f97c6dd124a73c89e293f6105709b Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 25 May 2018 09:13:00 +0100 Subject: [PATCH] JAL-2994 temporary patch with paths to Chimera for Windows --- .../edu/ucsf/rbvi/strucviz2/StructureManager.java | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) 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")) { -- 1.7.10.2