From 80631d199a0632c730e21d1a254d47cd3bc55e2a Mon Sep 17 00:00:00 2001 From: dgelessus <dgelessus@users.noreply.github.com> Date: Thu, 3 Jun 2021 19:24:16 +0200 Subject: [PATCH] Fix :trace sometimes displaying transitions as null --- CHANGELOG.md | 1 + src/main/java/de/prob2/jupyter/commands/TraceCommand.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b85f7..1ca4148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * This is an internal change and should not affect any user-visible behavior. That is, all inputs that were accepted by previous versions should still be accepted - if any previously valid inputs are no longer accepted, this is a bug. * As a side effect, the inspection and code completion features now work better in a few edge cases. * Fixed a bug where interrupting a command could make the kernel completely stop responding, requiring a manual restart. +* Fixed the `:trace` command sometimes displaying transitions as `null`. ## [1.2.0](https://www3.hhu.de/stups/downloads/prob2-jupyter/prob2-jupyter-kernel-1.2.0-all.jar) diff --git a/src/main/java/de/prob2/jupyter/commands/TraceCommand.java b/src/main/java/de/prob2/jupyter/commands/TraceCommand.java index 82db34f..b050b01 100644 --- a/src/main/java/de/prob2/jupyter/commands/TraceCommand.java +++ b/src/main/java/de/prob2/jupyter/commands/TraceCommand.java @@ -4,6 +4,7 @@ import java.util.List; import com.google.inject.Inject; +import de.prob.animator.domainobjects.FormulaExpand; import de.prob.statespace.AnimationSelector; import de.prob.statespace.Trace; import de.prob.statespace.Transition; @@ -66,7 +67,7 @@ public final class TraceCommand implements Command { final List<Transition> transitionList = trace.getTransitionList(); for (int i = 0; i < transitionList.size(); i++) { - final Transition transition = transitionList.get(i); + final Transition transition = transitionList.get(i).evaluate(FormulaExpand.TRUNCATE); sbPlain.append('\n'); sbPlain.append(i); sbPlain.append(": "); -- GitLab