JAL-1823 Deleted two obsolete methods in PopupMenu.java, updated tooltip text for...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 20 Jun 2016 11:07:25 +0000 (12:07 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 20 Jun 2016 11:07:25 +0000 (12:07 +0100)
resources/lang/Messages.properties
src/jalview/gui/PopupMenu.java
src/jalview/gui/StructureChooser.java

index 672a5a2..f954887 100644 (file)
@@ -675,7 +675,7 @@ label.view_all_representative_structures = View all {0} representative structure
 label.open_new_jmol_view_with_all_representative_structures_associated_current_selection_superimpose_using_alignment = Opens a new structure viewer with all representative structures\nassociated with the current selection\nsuperimposed with the current alignment.
 label.associate_structure_with_sequence = Associate Structure with Sequence
 label.from_file = From File
-label.enter_pdb_id = Enter PDB Id (Note: Specific chains can be retrieved by appending the chain code to the PDB Id delimited with a colon i.e. 1abc:X)
+label.enter_pdb_id = Enter PDB Id (or pdbid:chaincode)
 label.discover_pdb_ids = Discover PDB IDs
 label.text_colour = Text Colour
 action.set_text_colour = Text Colour...
index 4b0ffad..e64d43f 100644 (file)
@@ -60,7 +60,6 @@ import jalview.util.GroupUrlLink;
 import jalview.util.GroupUrlLink.UrlStringTooLongException;
 import jalview.util.MessageManager;
 import jalview.util.UrlLink;
-import jalview.ws.DBRefFetcher;
 
 import java.awt.Color;
 import java.awt.event.ActionEvent;
@@ -2364,45 +2363,6 @@ public class PopupMenu extends JPopupMenu
             ap, true));
   }
 
-  public void enterPDB_actionPerformed()
-  {
-    String id = JOptionPane.showInternalInputDialog(Desktop.desktop,
-            MessageManager.getString("label.enter_pdb_id"),
-            MessageManager.getString("label.enter_pdb_id"),
-            JOptionPane.QUESTION_MESSAGE);
-
-    if (id != null && id.length() > 0)
-    {
-      PDBEntry entry = new PDBEntry();
-      entry.setId(id.toUpperCase());
-      sequence.getDatasetSequence().addPDBId(entry);
-    }
-  }
-
-  public void discoverPDB_actionPerformed()
-  {
-
-    final SequenceI[] sequences = ((ap.av.getSelectionGroup() == null) ? new SequenceI[]
-    { sequence }
-            : ap.av.getSequenceSelection());
-    Thread discpdb = new Thread(new Runnable()
-    {
-      @Override
-      public void run()
-      {
-        boolean isNucleotide = ap.alignFrame.getViewport().getAlignment()
-                .isNucleotide();
-
-        new DBRefFetcher(sequences, ap.alignFrame, null,
-                ap.alignFrame.featureSettings, isNucleotide)
-                .fetchDBRefs(false);
-
-      }
-
-    });
-    discpdb.start();
-  }
-
   public void sequenceFeature_actionPerformed()
   {
     SequenceGroup sg = ap.av.getSelectionGroup();
index fd2de8e..c83f264 100644 (file)
@@ -806,9 +806,13 @@ public class StructureChooser extends GStructureChooser implements
         pdbEntry = new PDBEntry();
             if (pdbIdStr.split(":").length > 1)
             {
-              pdbEntry.setChainCode(pdbIdStr.split(":")[1]);
+              pdbEntry.setId(pdbIdStr.split(":")[0]);
+              pdbEntry.setChainCode(pdbIdStr.split(":")[1].toUpperCase());
+            }
+            else
+            {
+              pdbEntry.setId(pdbIdStr);
             }
-        pdbEntry.setId(pdbIdStr);
         pdbEntry.setType(PDBEntry.Type.PDB);
         selectedSequence.getDatasetSequence().addPDBId(pdbEntry);
       }