--- /dev/null
+package jalview.ws2.actions;
+
+import java.util.List;
+
+import jalview.viewmodel.AlignmentViewport;
+import jalview.ws.params.ArgumentI;
+import jalview.ws2.actions.api.ActionI;
+import jalview.ws2.actions.api.TaskEventListener;
+import jalview.ws2.actions.api.TaskI;
+import jalview.ws2.api.Credentials;
+
+/**
+ * An empty implementation of the {@link ActionI} interface that does nothing.
+ * Use as a placeholder for testing purposes.
+ *
+ * @author mmwarowny
+ *
+ */
+public final class NullAction extends BaseAction<Void>
+{
+ public static final class Builder extends BaseAction.Builder<NullAction>
+ {
+ public NullAction build()
+ {
+ return new NullAction(this);
+ }
+ }
+
+ public static Builder newBuilder()
+ {
+ return new Builder();
+ }
+
+ protected NullAction(Builder builder)
+ {
+ super(builder);
+ }
+
+ @Override
+ public TaskI<Void> perform(AlignmentViewport viewport,
+ List<ArgumentI> args, Credentials credentials,
+ TaskEventListener<Void> handler)
+ {
+ return new NullTask();
+ }
+
+ @Override
+ public boolean isActive(AlignmentViewport viewport)
+ {
+ return false;
+ }
+}
--- /dev/null
+package jalview.ws2.actions;
+
+import java.util.Collections;
+import java.util.List;
+
+import jalview.ws2.actions.api.JobI;
+import jalview.ws2.actions.api.TaskI;
+import jalview.ws2.api.JobStatus;
+
+/**
+ * An empty task returned by the {@link NullAction}. Use as a placeholder
+ * for testing purposes.
+ *
+ * @author mmwarowny
+ *
+ */
+class NullTask implements TaskI<Void>
+{
+ @Override
+ public long getUid()
+ {
+ return 0;
+ }
+
+ @Override
+ public JobStatus getStatus()
+ {
+ return JobStatus.READY;
+ }
+
+ @Override
+ public List<? extends JobI> getSubJobs()
+ {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public Void getResult()
+ {
+ return null;
+ }
+
+ @Override
+ public void cancel()
+ {
+ }
+}
\ No newline at end of file