import java.util.EnumSet;
import java.util.List;
+import javax.swing.Icon;
+
+import jalview.api.AlignViewportI;
import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.ArgumentI;
import jalview.ws2.api.CredentialType;
String getName();
/**
+ * Get the full name of the action consisting of the service name and the
+ * action name if present.
+ *
+ * @return full name of this action
+ */
+ default String getFullName()
+ {
+ var name = getName();
+ if (name == null || name.isEmpty())
+ return getWebService().getName();
+ else
+ return getWebService().getName() + " " + name;
+ }
+
+ /**
* Get the tooltip for the action which contains extra details about the
* action.
*
EnumSet<CredentialType> getRequiredCredentials();
/**
- * Run the action, create and start a new task with provided viewport,
- * arguments and credentials and attach the handler to the task. The
- * implementations of this method are responsible for starting the task using
- * execution method appropriate for the action class.
+ * Create a new task with provided viewport, arguments and credentials ready
+ * to be started.
*
* @param viewport
* current alignment viewport
* job parameters appropriate for the service
* @param credentials
* optional user credentials
- * @param handler
- * event handler attached to the new task
- * @return new running task
+ * @return new task
*/
- TaskI<R> perform(AlignmentViewport viewport, List<ArgumentI> args,
- Credentials credentials, TaskEventListener<R> handler);
+ TaskI<R> createTask(AlignViewportI viewport, List<ArgumentI> args,
+ Credentials credentials);
/**
* Return if the action is currently active for the given viewport. Active