From b22e1863f9c10dbff13ca8bc889255b91f0c4d1c Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 3 Jan 2019 17:11:02 +0000 Subject: [PATCH] JAL-3181 order link menu items --- src/jalview/gui/PopupMenu.java | 1 + src/jalview/urls/CustomUrlProvider.java | 15 ++-- src/jalview/util/UrlLink.java | 74 ++++++++++++++-- test/jalview/gui/PopupMenuTest.java | 139 ++++++++++++------------------- test/jalview/util/UrlLinkTest.java | 40 +++++++-- 5 files changed, 160 insertions(+), 109 deletions(-) diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index ed3d29a..473ac3a 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -618,6 +618,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener if (seq != null) { nlinks = Preferences.sequenceUrlLinks.getLinksForMenu(); + UrlLink.sort(nlinks); } else { diff --git a/src/jalview/urls/CustomUrlProvider.java b/src/jalview/urls/CustomUrlProvider.java index 86d5660..d23f771 100644 --- a/src/jalview/urls/CustomUrlProvider.java +++ b/src/jalview/urls/CustomUrlProvider.java @@ -107,12 +107,12 @@ public class CustomUrlProvider extends UrlProviderImpl { // cachedUrlList is in form