- String format = IdentifyFile.Identify(text, "Paste");\r
- try{\r
- sequences = new AppletFormatAdapter().readFile(text, "Paste", format);\r
- }catch(java.io.IOException ex)\r
+ fin.parse();\r
+ if (fin.getTree() != null)\r
+ {\r
+ alignFrame.loadTree(fin, "Pasted tree file");\r
+ }\r
+\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ textarea.setText("Could not parse Newick file!\n" + ex);\r
+ return;\r
+ }\r
+ }\r
+ else if (annotationImport)\r
+ {\r
+ if (new AnnotationFile().readAnnotationFile(\r
+ alignFrame.viewport.alignment, textarea.getText(),\r
+ jalview.io.AppletFormatAdapter.PASTE))\r
+ {\r
+ alignFrame.alignPanel.fontChanged();\r
+ alignFrame.alignPanel.setScrollValues(0, 0);\r
+\r
+ }\r
+ else\r
+ {\r
+ alignFrame.parseFeaturesFile(textarea.getText(),\r
+ jalview.io.AppletFormatAdapter.PASTE);\r
+ }\r
+ }\r
+ else if (alignFrame != null)\r
+ {\r
+ Alignment al = null;\r
+\r
+ String format = new IdentifyFile().Identify(text,\r
+ AppletFormatAdapter.PASTE);\r
+ try\r
+ {\r
+ al = new AppletFormatAdapter().readFile(text, AppletFormatAdapter.PASTE,\r
+ format);\r
+ }\r
+ catch (java.io.IOException ex)\r