From ccc31f21ed36c2e43b5a1b450846284151c680bb Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Tue, 26 Jul 2016 11:57:46 +0100 Subject: [PATCH] JAL-2157 bugfix for issues from enum refactoring --- src/jalview/io/AppletFormatAdapter.java | 5 +++-- src/jalview/structure/StructureSelectionManager.java | 6 +++++- src/jalview/ws/dbsources/Pdb.java | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index d62de27..55bb03d 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -282,8 +282,9 @@ public class AppletFormatAdapter // TODO obtain config value from preference settings. // Set value to 'true' to test PDB processing with Jmol: JAL-1213 boolean isParseWithJMOL = StructureImportSettings - .getDefaultPDBFileParser() - .equals(StructureImportSettings.StructureParser.JMOL_PARSER); + .getDefaultPDBFileParser().equalsIgnoreCase( + StructureImportSettings.StructureParser.JMOL_PARSER + .toString()); if (isParseWithJMOL) { StructureImportSettings.addSettings(annotFromStructure, diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index fb96b22..be042e6 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -385,7 +385,11 @@ public class StructureSelectionManager try { - if (pdbFile != null && isCIFFile(pdbFile)) + boolean isParseWithJMOL = StructureImportSettings + .getDefaultPDBFileParser().equalsIgnoreCase( + StructureImportSettings.StructureParser.JMOL_PARSER + .toString()); + if (isParseWithJMOL || (pdbFile != null && isCIFFile(pdbFile))) { pdb = new jalview.ext.jmol.JmolParser(addTempFacAnnot, parseSecStr, secStructServices, pdbFile, protocol); diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index fc636c6..61c5c04 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -134,7 +134,7 @@ public class Pdb extends EbiFileRetrievedProxy return null; } String ext = StructureImportSettings.getDefaultStructureFileFormat() - .equals(Type.MMCIF) ? ".cif" : ".xml"; + .equalsIgnoreCase(Type.MMCIF.toString()) ? ".cif" : ".xml"; EBIFetchClient ebi = new EBIFetchClient(); file = ebi.fetchDataAsFile("pdb:" + id, StructureImportSettings.getDefaultStructureFileFormat().toLowerCase(), -- 1.7.10.2