X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=fb414f41ff1d143dcf8ee74967b70543a275bb3d;hb=4eb1ed22600411fe5b6e9ac93084b45429ccfad6;hp=65fd72faaa141889d093aa917d73a7b9819c6f07;hpb=4da7d6ec8ef5ff030c6d06d37a099da2d92d7246;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index 65fd72f..fb414f4 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -26,7 +26,7 @@ import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; -import jalview.structure.StructureViewSettings; +import jalview.structure.StructureImportSettings; import jalview.util.MessageManager; import java.io.File; @@ -280,10 +280,11 @@ public class AppletFormatAdapter { // TODO obtain config value from preference settings. // Set value to 'true' to test PDB processing with Jmol: JAL-1213 - boolean isParseWithJMOL = false; + boolean isParseWithJMOL = !StructureImportSettings + .getCurrentDefaultFormat().equalsIgnoreCase("PDB"); if (isParseWithJMOL) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, @@ -291,7 +292,9 @@ public class AppletFormatAdapter } else { - StructureViewSettings.setShowSeqFeatures(true); + StructureImportSettings.addSettings(annotFromStructure, + localSecondaryStruct, serviceSecondaryStruct); + StructureImportSettings.setShowSeqFeatures(true); alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, type); @@ -299,7 +302,7 @@ public class AppletFormatAdapter } else if (format.equals("mmCIF")) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, type); @@ -330,7 +333,7 @@ public class AppletFormatAdapter } else if (format.equals(IdentifyFile.FeaturesFile)) { - alignFile = new FeaturesFile(inFile, type); + alignFile = new FeaturesFile(true, inFile, type); } return buildAlignmentFrom(alignFile); } catch (Exception e) @@ -433,21 +436,21 @@ public class AppletFormatAdapter boolean isParseWithJMOL = false; if (isParseWithJMOL) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); } else { - StructureViewSettings.setShowSeqFeatures(true); + StructureImportSettings.setShowSeqFeatures(true); alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); } } else if (format.equals("mmCIF")) { - StructureViewSettings.addSettings(annotFromStructure, + StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source);