From cbb831632d71920f5c09fbb9f43ccfadbcea9d2c Mon Sep 17 00:00:00 2001 From: Mateusz Warowny Date: Tue, 5 Apr 2022 14:14:00 +0200 Subject: [PATCH] JAL-3878 Add fullName to BaseAction class which combines service and action name --- src/jalview/ws2/actions/BaseAction.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/jalview/ws2/actions/BaseAction.java b/src/jalview/ws2/actions/BaseAction.java index 97cf6fa..106937b 100644 --- a/src/jalview/ws2/actions/BaseAction.java +++ b/src/jalview/ws2/actions/BaseAction.java @@ -139,6 +139,20 @@ public abstract class BaseAction implements ActionI return name; } + /** + * Returns a full name of the action which comprises of the service name and + * the action name if present. + * + * @return full name of this action + */ + public String getFullName() + { + if (name == null || name.isEmpty()) + return webService.getName(); + else + return webService.getName() + " " + name; + } + @Override public String getTooltip() { -- 1.7.10.2