From 31486be4056ec696814c738c80d2ee6ce3795ca5 Mon Sep 17 00:00:00 2001
From: Sebastian Krings <sebastian@krin.gs>
Date: Tue, 23 Apr 2013 18:16:23 +0200
Subject: [PATCH] refactoring of enum, renamed element

---
 .../command/ConstraintBasedAssertionCheckCommand.java    | 9 +++++----
 .../ui/assertion/AssertionCheckFinishedListener.java     | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/de.prob.core/src/de/prob/core/command/ConstraintBasedAssertionCheckCommand.java b/de.prob.core/src/de/prob/core/command/ConstraintBasedAssertionCheckCommand.java
index 802e83ad..88edcfaf 100644
--- a/de.prob.core/src/de/prob/core/command/ConstraintBasedAssertionCheckCommand.java
+++ b/de.prob.core/src/de/prob/core/command/ConstraintBasedAssertionCheckCommand.java
@@ -17,14 +17,15 @@ import de.prob.prolog.term.PrologTerm;
 public class ConstraintBasedAssertionCheckCommand implements IComposableCommand {
 
 	public static enum ResultType {
-		TIMEOUT, COUNTER_EXAMPLE, NO_COUNTER_EXAMPLE
+		INTERRUPTED, COUNTER_EXAMPLE, NO_COUNTER_EXAMPLE
 	};
 
 	private static final String COMMAND_NAME = "cbc_static_assertion_violation_checking";
 	private static final String RESULT_VARIABLE = "R";
 
 	private ResultType result;
-	private ListPrologTerm counterExampleState;
+	private Operation counterExampleOperation;
+	private String counterExampleStateID;
 
 	public ConstraintBasedAssertionCheckCommand() {
 	}
@@ -50,8 +51,8 @@ public class ConstraintBasedAssertionCheckCommand implements IComposableCommand
 			throws CommandException {
 		final PrologTerm resultTerm = bindings.get(RESULT_VARIABLE);
 		final ResultType result;
-		if (resultTerm.hasFunctor("time_out", 0)) {
-			result = ResultType.TIMEOUT;
+		if (resultTerm.hasFunctor("interrupted", 0)) {
+			result = ResultType.INTERRUPTED;
 		} else if (resultTerm.hasFunctor("no_counterexample_found", 0)) {
 			result = ResultType.NO_COUNTER_EXAMPLE;
 		} else if (resultTerm.hasFunctor("counterexample_found", 1)) {
diff --git a/de.prob.ui/src/de/prob/ui/assertion/AssertionCheckFinishedListener.java b/de.prob.ui/src/de/prob/ui/assertion/AssertionCheckFinishedListener.java
index 03ae3045..68c45628 100644
--- a/de.prob.ui/src/de/prob/ui/assertion/AssertionCheckFinishedListener.java
+++ b/de.prob.ui/src/de/prob/ui/assertion/AssertionCheckFinishedListener.java
@@ -56,7 +56,7 @@ public class AssertionCheckFinishedListener extends ProBJobFinishedListener {
 				message = "The model contains a Counter-Example state, it will be shown in the state view.";
 				displayCounterExample(command, animator);
 				break;
-			case TIMEOUT:
+			case INTERRUPTED:
 				dialogType = MessageDialog.WARNING;
 				dialogTitle = " Interrupt";
 				message = "The deadlock check has been interrupted by the user or a time-out.";
-- 
GitLab