ref #6924 Invoke operation onComplete() method in runnable
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 2 Nov 2017 14:36:40 +0000 (15:36 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 2 Nov 2017 14:36:40 +0000 (15:36 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java

index da293d6b107bc4265728d4d0e72777357e293662..b39a7f7abdac888b8c95d223a50bad9ddc9616de 100644 (file)
@@ -149,6 +149,11 @@ public abstract class AbstractUtility {
                 String statusString = status.equals(Status.OK_STATUS) ? "completed"
                         : "cancelled";
                 setStatusLine(operationlabel + " " + statusString + ".");
+                IPostOperationEnabled postOperationEnabled = operation
+                        .getPostOperationEnabled();
+                if (postOperationEnabled != null) {
+                    postOperationEnabled.onComplete();
+                }
             });
         });
 
@@ -159,11 +164,6 @@ public abstract class AbstractUtility {
             MessagingUtils.messageDialog("Error executing operation", AbstractUtility.class, "An error occured while executing " + operation.getLabel(), e);
         }
 
-        IPostOperationEnabled postOperationEnabled = operation
-                .getPostOperationEnabled();
-        if (postOperationEnabled != null) {
-            postOperationEnabled.onComplete();
-        }
         return Status.OK_STATUS;
     }