Skip to content
Snippets Groups Projects
Commit 388da10e authored by Sebastian Krings's avatar Sebastian Krings
Browse files

working on analysis handler

parent 42dd4ec3
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,6 @@ package de.prob.ui.eventb; ...@@ -8,7 +8,6 @@ package de.prob.ui.eventb;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionEvent;
...@@ -39,10 +38,11 @@ import de.prob.core.LimitedLogger; ...@@ -39,10 +38,11 @@ import de.prob.core.LimitedLogger;
import de.prob.core.command.ActivateUnitPluginCommand; import de.prob.core.command.ActivateUnitPluginCommand;
import de.prob.core.command.ClearMachineCommand; import de.prob.core.command.ClearMachineCommand;
import de.prob.core.command.ComposedCommand; import de.prob.core.command.ComposedCommand;
import de.prob.core.command.GetCurrentStateIdCommand;
import de.prob.core.command.GetStateValuesCommand;
import de.prob.core.command.SetPreferencesCommand; import de.prob.core.command.SetPreferencesCommand;
import de.prob.core.command.StartAnimationCommand; import de.prob.core.command.StartAnimationCommand;
import de.prob.core.command.internal.InternalLoadCommand; import de.prob.core.command.internal.InternalLoadCommand;
import de.prob.core.domainobjects.State;
import de.prob.core.domainobjects.Variable; import de.prob.core.domainobjects.Variable;
import de.prob.exceptions.ProBException; import de.prob.exceptions.ProBException;
import de.prob.logging.Logger; import de.prob.logging.Logger;
...@@ -131,11 +131,16 @@ public class StartUnitAnalysisHandler extends AbstractHandler implements ...@@ -131,11 +131,16 @@ public class StartUnitAnalysisHandler extends AbstractHandler implements
animator.execute(composed); animator.execute(composed);
// TODO: get resulting state and fill attributes // TODO: get resulting state and fill attributes
State state = animator.getCurrentState(); String currentID = GetCurrentStateIdCommand.getID(animator);
Map<String, Variable> values = state.getValues(); GetStateValuesCommand stateValuesCommand = new GetStateValuesCommand(
currentID);
for (String s : values.keySet()) { animator.execute(stateValuesCommand);
System.out.println(s);
List<Variable> vars = stateValuesCommand.getResult();
for (Variable v : vars) {
System.out.println(v.getIdentifier());
} }
// shutdown animator // shutdown animator
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment