X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=9695891e566bad7f332692a2cf64e68d476e2110;hb=fbc92d8f171f75002890bfa0ea1f436f7125d3b5;hp=552f00edc24cbc8fea60631a5ce93f6369dc71e0;hpb=ce6f02a53c98e51cb96533d40db5f94d1bfea00a;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 552f00e..9695891 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -278,11 +278,36 @@ public class AppletFormatAdapter alignFile = new JPredFile(inFile, type); ((JPredFile) alignFile).removeNonSequences(); } - else if (format.equals("PDB") || format.equalsIgnoreCase("mmCIF")) + else if (format.equals("PDB")) + { + // TODO obtain config value from preference settings. + // Set value to 'true' to test PDB processing with Jmol: JAL-1213 + boolean isParseWithJMOL = StructureImportSettings + .getDefaultPDBFileParser().equalsIgnoreCase( + StructureImportSettings.StructureParser.JMOL_PARSER + .toString()); + if (isParseWithJMOL) + { + StructureImportSettings.addSettings(annotFromStructure, + localSecondaryStruct, serviceSecondaryStruct); + alignFile = new jalview.ext.jmol.JmolParser(inFile, type); + } + else + { + StructureImportSettings.addSettings(annotFromStructure, + localSecondaryStruct, serviceSecondaryStruct); + StructureImportSettings.setShowSeqFeatures(true); + alignFile = new MCview.PDBfile(annotFromStructure, + localSecondaryStruct, serviceSecondaryStruct, inFile, + type); + } + ((StructureFile) alignFile).setDbRefType(format); + } + else if (format.equalsIgnoreCase("mmCIF")) { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new JmolParser(inFile, type); + alignFile = new jalview.ext.jmol.JmolParser(inFile, type); ((StructureFile) alignFile).setDbRefType(format); } else if (format.equals("STH"))