JAL-2157 bugfix for issues from enum refactoring
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 26 Jul 2016 10:57:46 +0000 (11:57 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 26 Jul 2016 10:57:46 +0000 (11:57 +0100)
src/jalview/io/AppletFormatAdapter.java
src/jalview/structure/StructureSelectionManager.java
src/jalview/ws/dbsources/Pdb.java

index d62de27..55bb03d 100755 (executable)
@@ -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,
index fb96b22..be042e6 100644 (file)
@@ -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);
index fc636c6..61c5c04 100644 (file)
@@ -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(),