From: Mateusz Warowny Date: Tue, 5 Apr 2022 12:14:00 +0000 (+0200) Subject: JAL-3878 Add fullName to BaseAction class which combines service and action name X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cbb831632d71920f5c09fbb9f43ccfadbcea9d2c;p=jalview.git JAL-3878 Add fullName to BaseAction class which combines service and action name --- 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() {