From eeaa6656c9112a445bb78745d31b31eccfa76e37 Mon Sep 17 00:00:00 2001
From: Michael Leuschel <leuschel@cs.uni-duesseldorf.de>
Date: Tue, 24 Sep 2019 15:07:44 +0200
Subject: [PATCH] provide feedback when execute with predicate failed

---
 .../ui/operationview/CustomPreconditionDialogHandler.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/de.prob.ui/src/de/prob/ui/operationview/CustomPreconditionDialogHandler.java b/de.prob.ui/src/de/prob/ui/operationview/CustomPreconditionDialogHandler.java
index 4a1fe38a..820b8a59 100644
--- a/de.prob.ui/src/de/prob/ui/operationview/CustomPreconditionDialogHandler.java
+++ b/de.prob.ui/src/de/prob/ui/operationview/CustomPreconditionDialogHandler.java
@@ -39,9 +39,14 @@ public class CustomPreconditionDialogHandler extends AbstractHandler implements
 		if (op == null)
 			return null;
 		try {
+			int hisSize = Animator.getAnimator().getHistory().size();
+			System.out.println("History Size = " + hisSize);
 			ExecuteOperationCommand
 					.executeOperation(Animator.getAnimator(), op);
 					// TODO: provide feedback when we cannot execute operation
+			if (Animator.getAnimator().getHistory().size() <= hisSize) {
+				Logger.notifyUser("Could not execute event "+ filtered.get(0).getName() + " with the additional predicate provided!");
+			}
 		} catch (ProBException e) {
 			e.notifyUserOnce();
 		}
-- 
GitLab