From 32ccffc95209f230faacf6f27394669c0dc8b271 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 30 Nov 2005 15:37:59 +0000 Subject: [PATCH] Parse id before url completion --- src/jalview/gui/IdPanel.java | 3 +++ src/jalview/gui/PopupMenu.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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); -- 1.7.10.2