diff --git a/de.prob.core/src/de/prob/core/command/GetPluginResultCommand.java b/de.prob.core/src/de/prob/core/command/GetPluginResultCommand.java index ec020db3ed7e8c7a9daf7c21ca5bda43a023e10f..eb99459f5a1e7b6264873bd541f0e8d7f81a06c0 100644 --- a/de.prob.core/src/de/prob/core/command/GetPluginResultCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetPluginResultCommand.java @@ -16,34 +16,27 @@ import de.prob.prolog.term.PrologTerm; public final class GetPluginResultCommand implements IComposableCommand { private final String resultID; - private String result; + private ListPrologTerm result; public GetPluginResultCommand(final String resultID) { this.resultID = resultID; } - public String getResult() { + public ListPrologTerm getResult() { return result; } public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { - ListPrologTerm list; try { - list = BindingGenerator.getList(bindings, "Bindings"); + result = BindingGenerator.getList(bindings, "Bindings"); } catch (ResultParserException e) { CommandException commandException = new CommandException( e.getLocalizedMessage(), e); commandException.notifyUserOnce(); throw commandException; } - - for (PrologTerm term : list) { - int nextCharCode = BindingGenerator.getInteger(term).getValue() - .intValue(); - result += (char) nextCharCode; - } } public void writeCommand(final IPrologTermOutput pto) { diff --git a/de.prob.ui/src/de/prob/ui/eventb/StartUnitAnalysisHandler.java b/de.prob.ui/src/de/prob/ui/eventb/StartUnitAnalysisHandler.java index 11b730830b22d94faf4009bbe41769486f495d12..554c05b976a1a58da17bb57c614b2c702e11c4cb 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/StartUnitAnalysisHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/StartUnitAnalysisHandler.java @@ -44,6 +44,7 @@ import de.prob.core.command.StartAnimationCommand; import de.prob.core.command.internal.InternalLoadCommand; import de.prob.exceptions.ProBException; import de.prob.logging.Logger; +import de.prob.prolog.term.ListPrologTerm; public class StartUnitAnalysisHandler extends AbstractHandler implements IHandler { @@ -130,11 +131,11 @@ public class StartUnitAnalysisHandler extends AbstractHandler implements // TODO: get resulting state and fill attributes GetPluginResultCommand stateValuesCommand = new GetPluginResultCommand( - "Static Analysis Result"); + "Grounded Result State"); animator.execute(stateValuesCommand); - String output = stateValuesCommand.getResult(); + ListPrologTerm output = stateValuesCommand.getResult(); System.out.println(output);