Skip to content
Snippets Groups Projects
Commit 1896b092 authored by dgelessus's avatar dgelessus
Browse files

Provide source code to error highlighter in :find

parent 695497e1
Branches
Tags
No related merge requests found
......@@ -40,8 +40,10 @@ public final class FindCommand implements Command {
@Override
public @NotNull DisplayData run(final @NotNull String argString) {
final Trace trace = this.animationSelector.getCurrentTrace();
final Trace newTrace = CommandUtils.withSourceCode(argString, () -> {
final IEvalElement pred = trace.getModel().parseFormula(argString, FormulaExpand.EXPAND);
final Trace newTrace = trace.getStateSpace().getTraceToState(pred);
return trace.getStateSpace().getTraceToState(pred);
});
this.animationSelector.changeCurrentAnimation(newTrace);
return new DisplayData("Found state: " + newTrace.getCurrentState().getId());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment