JAL-2068 deleting user-defined annotation removes the worker
[jalview.git] / src / jalview / api / AlignCalcManagerI.java
index 66f4036..b502f86 100644 (file)
@@ -63,7 +63,7 @@ public interface AlignCalcManagerI
    * 
    * @param worker
    */
-  void workerCannotRun(AlignCalcWorkerI worker);
+  void disableWorker(AlignCalcWorkerI worker);
 
   /**
    * indicate that a worker like this may be run on the platform.
@@ -71,7 +71,7 @@ public interface AlignCalcManagerI
    * @param worker
    *          of class to be removed from the execution blacklist
    */
-  void workerMayRun(AlignCalcWorkerI worker);
+  void enableWorker(AlignCalcWorkerI worker);
 
   /**
    * launch a new worker
@@ -158,4 +158,12 @@ public interface AlignCalcManagerI
    */
   void removeRegisteredWorkersOfClass(Class typeToRemove);
 
+  /**
+   * Removes the worker that produces the given annotation, provided it is
+   * marked as 'deletable'. Some workers may need to continue to run as the
+   * results of their calculations are needed elsewhere e.g. for colour schemes.
+   * 
+   * @param ann
+   */
+  void removeWorkerForAnnotation(AlignmentAnnotation ann);
 }