JAL-2805 warning messages added if Forester detects file loading issues
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Mon, 13 Nov 2017 15:43:56 +0000 (15:43 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Mon, 13 Nov 2017 15:43:56 +0000 (15:43 +0000)
src/jalview/ext/forester/io/TreeParser.java

index 7d097bd..b5a29bf 100644 (file)
@@ -1,6 +1,9 @@
 package jalview.ext.forester.io;
 
 import jalview.ext.archaeopteryx.ArchaeopteryxInit;
+import jalview.gui.Desktop;
+import jalview.gui.JvOptionPane;
+import jalview.util.MessageManager;
 
 import java.io.File;
 import java.io.IOException;
@@ -20,7 +23,10 @@ public class TreeParser
     final String possibleError = ForesterUtil.isReadableFile(treeFilePath);
     if (possibleError != null)
     {
-      // something
+      JvOptionPane.showMessageDialog(Desktop.desktop, possibleError,
+              MessageManager.getString("label.problem_reading_tree_file"),
+              JvOptionPane.WARNING_MESSAGE);
+
     }
     filePath = treeFilePath;
     file = new File(filePath);
@@ -33,7 +39,10 @@ public class TreeParser
     final String possibleError = ForesterUtil.isReadableFile(treeFile);
     if (possibleError != null)
     {
-      // something
+      JvOptionPane.showMessageDialog(Desktop.desktop, possibleError,
+              MessageManager.getString("label.problem_reading_tree_file"),
+              JvOptionPane.WARNING_MESSAGE);
+
     }
     file = treeFile;
     filePath = file.getCanonicalPath();