JAL-3878 Build interactive services menu
[jalview.git] / src / jalview / ws2 / actions / annotation / AnnotationTask.java
index 8f210e0..9d16400 100644 (file)
@@ -209,6 +209,7 @@ public class AnnotationTask implements TaskI<AnnotationResult>
 
     void stop()
     {
+      calcMan.disableWorker(this);
       super.abortAndDestroy();
     }
 
@@ -228,6 +229,13 @@ public class AnnotationTask implements TaskI<AnnotationResult>
       // dispose of unfinished jobs just in case
       cancelJobs();
     }
+
+    @Override
+    public String toString()
+    {
+      return AnnotationTask.this.toString() + "$AlignCalcWorker@"
+          + Integer.toHexString(hashCode());
+    }
   }
 
   public AnnotationTask(AnnotationWebServiceClientI client,
@@ -576,6 +584,6 @@ public class AnnotationTask implements TaskI<AnnotationResult>
   public String toString()
   {
     var status = taskStatus != null ? taskStatus.name() : "UNSET";
-    return String.format("AnnotationTask(%d, %s)", uid, status);
+    return String.format("%s(%x, %s)", getClass().getSimpleName(), uid, status);
   }
 }