From 25d8a7ecd5e259b37f54e33cc3989f29cca4bf4f Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Mon, 20 Jun 2016 12:07:25 +0100 Subject: [PATCH] JAL-1823 Deleted two obsolete methods in PopupMenu.java, updated tooltip text for manual PDB entry, and fixed error while manually retrieving some specific PDB chains. --- resources/lang/Messages.properties | 2 +- src/jalview/gui/PopupMenu.java | 40 --------------------------------- src/jalview/gui/StructureChooser.java | 8 +++++-- 3 files changed, 7 insertions(+), 43 deletions(-) diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 672a5a2..f954887 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -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... diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 4b0ffad..e64d43f 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -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(); diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index fd2de8e..c83f264 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -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); } -- 1.7.10.2