From: amwaterhouse Date: Wed, 30 Nov 2005 15:37:59 +0000 (+0000) Subject: Parse id before url completion X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=32ccffc95209f230faacf6f27394669c0dc8b271;p=jalview.git Parse id before url completion --- diff --git a/src/jalview/gui/IdPanel.java b/src/jalview/gui/IdPanel.java index 2d9c4f3..8ff3df2 100755 --- a/src/jalview/gui/IdPanel.java +++ b/src/jalview/gui/IdPanel.java @@ -164,6 +164,9 @@ public class IdPanel extends JPanel implements MouseListener, //DEFAULT LINK IS FIRST IN THE LINK LIST int seq = av.getIndex(y); String id = av.getAlignment().getSequenceAt(seq).getName(); + if (id.indexOf("|") > -1) + id = id.substring(id.lastIndexOf("|") + 1); + String url = links.elementAt(0).toString(); url = url.substring(url.indexOf("|")+1); diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 7413150..f9e0d19 100755 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -227,7 +227,7 @@ public class PopupMenu extends JPopupMenu id = id.substring(id.lastIndexOf("|")+1); final String url = link.substring(link.indexOf("|")+1, link.indexOf("$SEQUENCE_ID$")) - + sequence.getName() + + + id + link.substring(link.indexOf("$SEQUENCE_ID$") + 13);