JAL-2629 add ability to add and select a DB for hmmsearch
[jalview.git] / src / jalview / jbgui / GAlignFrame.java
index cf6c487..c2d19d7 100755 (executable)
@@ -25,6 +25,7 @@ import jalview.api.SplitContainerI;
 import jalview.bin.Cache;
 import jalview.gui.JvSwingUtils;
 import jalview.gui.Preferences;
+import jalview.io.FileFormatException;
 import jalview.io.FileFormats;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
@@ -82,6 +83,8 @@ public class GAlignFrame extends JInternalFrame
 
   protected JMenuItem hmmSearchSettings = new JMenuItem();
 
+  protected JMenuItem addDatabase = new JMenuItem();
+
   protected JMenu hmmBuild = new JMenu();
 
   protected JMenuItem hmmBuildRun = new JMenuItem();
@@ -1833,6 +1836,24 @@ public class GAlignFrame extends JInternalFrame
       }
 
     });
+    addDatabase.setText(MessageManager.getString("label.add_database"));
+    addDatabase.addActionListener(new ActionListener()
+    {
+
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        try
+        {
+          addDatabase_actionPerformed(e);
+        } catch (IOException e1)
+        {
+          // TODO Auto-generated catch block
+          e1.printStackTrace();
+        }
+      }
+
+    });
     hmmSearchSettings.setText(
             MessageManager.getString("label.edit_settings_and_run"));
     hmmSearchSettings.addActionListener(new ActionListener()
@@ -2055,8 +2076,11 @@ public class GAlignFrame extends JInternalFrame
             MessageManager.getString("label.edit_settings_and_run"));
     hmmSearchRun = new JMenuItem(MessageManager.formatMessage(
             "label.action_with_default_settings", "hmmsearch"));
+    addDatabase = new JMenuItem(
+            MessageManager.getString("label.add_database"));
     hmmSearch.add(hmmSearchSettings);
     hmmSearch.add(hmmSearchRun);
+    hmmSearch.add(addDatabase);
   }
 
   /**
@@ -2552,6 +2576,11 @@ public class GAlignFrame extends JInternalFrame
   {
   }
 
+  protected void addDatabase_actionPerformed(ActionEvent e)
+          throws FileFormatException, IOException
+  {
+  }
+
   protected void hmmAlignRun_actionPerformed(ActionEvent e)
           throws IOException, InterruptedException
   {