X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=4916bb3b44b7bedda13e5869b2cdda36920e5c47;hb=6babd7c2387996384a49042ed4290095c13d5ed9;hp=b0fee8835bf043903651299e3f1baf22f9c9ecd8;hpb=dd8112aefe2c3a08c51f1684d5cda16be938c74f;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index b0fee88..4916bb3 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -30,6 +30,7 @@ import jalview.datamodel.PDBEntry.Type; import jalview.datamodel.SequenceI; import jalview.ext.jmol.JmolParser; import jalview.structure.StructureImportSettings; +import jalview.util.Platform; import java.io.File; import java.io.IOException; @@ -158,7 +159,9 @@ public class AppletFormatAdapter this.selectedFile = selectedFile; if (selectedFile != null) + { this.inFile = selectedFile.getPath(); + } this.inFile = file; try { @@ -178,9 +181,9 @@ public class AppletFormatAdapter } else { - // todo is MCview parsing obsolete yet? JAL-2120 + // todo is mc_view parsing obsolete yet? JAL-2120 StructureImportSettings.setShowSeqFeatures(true); - alignFile = new MCview.PDBfile(annotFromStructure, + alignFile = new mc_view.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, sourceType); } @@ -265,7 +268,7 @@ public class AppletFormatAdapter else { StructureImportSettings.setShowSeqFeatures(true); - alignFile = new MCview.PDBfile(annotFromStructure, + alignFile = new mc_view.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, source); } ((StructureFile) alignFile).setDbRefType(Type.PDB); @@ -434,7 +437,9 @@ public class AppletFormatAdapter public static DataSourceType checkProtocol(Object dataObject) { if(dataObject instanceof File) + { return DataSourceType.FILE; + } String data = dataObject.toString(); DataSourceType protocol = DataSourceType.PASTE; @@ -444,7 +449,7 @@ public class AppletFormatAdapter { protocol = DataSourceType.URL; } - else if (jalview.bin.Jalview.isJS) + else if (Platform.isJS()) { protocol = DataSourceType.RELATIVE_URL; } @@ -455,6 +460,10 @@ public class AppletFormatAdapter return protocol; } + /** + * @param args + * @j2sIgnore + */ public static void main(String[] args) { int i = 0;