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

Provide source code to error highlighter in :dot

parent 1896b092
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,13 @@ public final class DotCommand implements Command { ...@@ -99,7 +99,13 @@ public final class DotCommand implements Command {
throw new UncheckedIOException("Failed to create temp file", e); throw new UncheckedIOException("Failed to create temp file", e);
} }
final GetSvgForVisualizationCommand cmd2 = new GetSvgForVisualizationCommand(trace.getCurrentState(), item, outPath.toFile(), args); final GetSvgForVisualizationCommand cmd2 = new GetSvgForVisualizationCommand(trace.getCurrentState(), item, outPath.toFile(), args);
trace.getStateSpace().execute(cmd2); // Provide source code (if any) to error highlighter
final Runnable execute = () -> trace.getStateSpace().execute(cmd2);
if (split.size() > 1) {
CommandUtils.withSourceCode(split.get(1), execute);
} else {
execute.run();
}
final String svg; final String svg;
try (final Stream<String> lines = Files.lines(outPath)) { try (final Stream<String> lines = Files.lines(outPath)) {
svg = lines.collect(Collectors.joining("\n")); svg = lines.collect(Collectors.joining("\n"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment