Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProB 2 Jupyter Kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB 2 Jupyter Kernel
Commits
0eef62b4
Commit
0eef62b4
authored
2 months ago
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Use new trace-based dot/table visualization APIs
parent
466902b3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/prob2/jupyter/commands/DotCommand.java
+4
-4
4 additions, 4 deletions
src/main/java/de/prob2/jupyter/commands/DotCommand.java
src/main/java/de/prob2/jupyter/commands/TableCommand.java
+1
-1
1 addition, 1 deletion
src/main/java/de/prob2/jupyter/commands/TableCommand.java
with
5 additions
and
5 deletions
src/main/java/de/prob2/jupyter/commands/DotCommand.java
+
4
−
4
View file @
0eef62b4
...
...
@@ -71,7 +71,7 @@ public final class DotCommand implements Command {
public
@NotNull
String
getHelpBody
()
{
final
StringBuilder
sb
=
new
StringBuilder
(
"The following dot visualisation commands are available:\n\n"
);
final
Trace
trace
=
this
.
animationSelector
.
getCurrentTrace
();
final
GetAllDotCommands
cmd
=
new
GetAllDotCommands
(
trace
.
getCurrentState
()
);
final
GetAllDotCommands
cmd
=
new
GetAllDotCommands
(
trace
);
trace
.
getStateSpace
().
execute
(
cmd
);
for
(
final
DynamicCommandItem
item
:
cmd
.
getCommands
())
{
sb
.
append
(
"* `"
);
...
...
@@ -99,7 +99,7 @@ public final class DotCommand implements Command {
final
Trace
trace
=
this
.
animationSelector
.
getCurrentTrace
();
final
DotVisualizationCommand
dotCommand
;
try
{
dotCommand
=
DotVisualizationCommand
.
getByName
(
command
,
trace
.
getCurrentState
()
);
dotCommand
=
DotVisualizationCommand
.
getByName
(
command
,
trace
);
}
catch
(
final
IllegalArgumentException
e
)
{
throw
new
UserErrorException
(
"No such dot command: "
+
command
,
e
);
}
...
...
@@ -131,10 +131,10 @@ public final class DotCommand implements Command {
return
new
ParameterCompleters
(
ImmutableMap
.
of
(
COMMAND_PARAM
,
(
commandName
,
at
)
->
{
final
Trace
trace
=
this
.
animationSelector
.
getCurrentTrace
();
final
GetAllDotCommands
cmd
=
new
GetAllDotCommands
(
trace
.
getCurrentState
()
);
final
GetAllDotCommands
cmd
=
new
GetAllDotCommands
(
trace
);
trace
.
getStateSpace
().
execute
(
cmd
);
final
String
prefix
=
commandName
.
substring
(
0
,
at
);
final
List
<
String
>
commands
=
DotVisualizationCommand
.
getAll
(
trace
.
getCurrentState
()
)
final
List
<
String
>
commands
=
DotVisualizationCommand
.
getAll
(
trace
)
.
stream
()
.
filter
(
DynamicCommandItem:
:
isAvailable
)
.
map
(
DynamicCommandItem:
:
getCommand
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/prob2/jupyter/commands/TableCommand.java
+
1
−
1
View file @
0eef62b4
...
...
@@ -72,7 +72,7 @@ public final class TableCommand implements Command {
final
Trace
trace
=
this
.
animationSelector
.
getCurrentTrace
();
final
IEvalElement
formula
=
kernel
.
parseFormula
(
args
.
get
(
EXPRESSION_PARAM
),
FormulaExpand
.
EXPAND
);
final
TableData
table
=
TableVisualizationCommand
.
getByName
(
TableVisualizationCommand
.
EXPRESSION_AS_TABLE_NAME
,
trace
.
getCurrentState
()
)
final
TableData
table
=
TableVisualizationCommand
.
getByName
(
TableVisualizationCommand
.
EXPRESSION_AS_TABLE_NAME
,
trace
)
.
visualize
(
Collections
.
singletonList
(
formula
));
final
StringBuilder
sbPlain
=
new
StringBuilder
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment