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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB 2 Jupyter Kernel
Commits
a77c9859
Commit
a77c9859
authored
Nov 30, 2018
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Update ShowCommand to match API changes in ProB 2
parent
856f768e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/prob2/jupyter/commands/ShowCommand.java
+8
-6
8 additions, 6 deletions
src/main/java/de/prob2/jupyter/commands/ShowCommand.java
with
8 additions
and
6 deletions
src/main/java/de/prob2/jupyter/commands/ShowCommand.java
+
8
−
6
View file @
a77c9859
...
@@ -8,6 +8,7 @@ import com.google.inject.Inject;
...
@@ -8,6 +8,7 @@ import com.google.inject.Inject;
import
de.prob.animator.command.GetAnimationMatrixForStateCommand
;
import
de.prob.animator.command.GetAnimationMatrixForStateCommand
;
import
de.prob.animator.command.GetImagesForMachineCommand
;
import
de.prob.animator.command.GetImagesForMachineCommand
;
import
de.prob.animator.command.GetPreferenceCommand
;
import
de.prob.animator.command.GetPreferenceCommand
;
import
de.prob.animator.domainobjects.AnimationMatrixEntry
;
import
de.prob.statespace.AnimationSelector
;
import
de.prob.statespace.AnimationSelector
;
import
de.prob.statespace.Trace
;
import
de.prob.statespace.Trace
;
...
@@ -94,20 +95,21 @@ public final class ShowCommand implements Command {
...
@@ -94,20 +95,21 @@ public final class ShowCommand implements Command {
tableBuilder
.
append
(
"px"
);
tableBuilder
.
append
(
"px"
);
}
}
tableBuilder
.
append
(
"\"><tbody>"
);
tableBuilder
.
append
(
"\"><tbody>"
);
for
(
final
List
<
Object
>
row
:
cmdMatrix
.
getMatrix
())
{
for
(
final
List
<
AnimationMatrixEntry
>
row
:
cmdMatrix
.
getMatrix
())
{
tableBuilder
.
append
(
"\n<tr>"
);
tableBuilder
.
append
(
"\n<tr>"
);
for
(
final
Object
entry
:
row
)
{
for
(
final
AnimationMatrixEntry
entry
:
row
)
{
final
int
padding
;
final
int
padding
;
final
String
contents
;
final
String
contents
;
if
(
entry
==
null
)
{
if
(
entry
==
null
)
{
padding
=
0
;
padding
=
0
;
contents
=
""
;
contents
=
""
;
}
else
if
(
entry
instanceof
Integer
)
{
}
else
if
(
entry
instanceof
AnimationMatrixEntry
.
Image
)
{
final
AnimationMatrixEntry
.
Image
imageEntry
=
(
AnimationMatrixEntry
.
Image
)
entry
;
padding
=
imagePadding
;
padding
=
imagePadding
;
contents
=
String
.
format
(
"<img alt=\"%d\" src=\"%s\"/>"
,
entry
,
images
.
get
(
entry
));
contents
=
String
.
format
(
"<img alt=\"%d\" src=\"%s\"/>"
,
imageEntry
.
getImageNumber
(),
images
.
get
(
imageEntry
.
getImageNumber
()
));
}
else
if
(
entry
instanceof
String
)
{
}
else
if
(
entry
instanceof
AnimationMatrixEntry
.
Text
)
{
padding
=
stringPadding
;
padding
=
stringPadding
;
contents
=
(
String
)
entry
;
contents
=
(
(
AnimationMatrixEntry
.
Text
)
entry
).
getText
()
;
}
else
{
}
else
{
throw
new
AssertionError
(
"Unhandled animation matrix entry type: "
+
entry
.
getClass
());
throw
new
AssertionError
(
"Unhandled animation matrix entry type: "
+
entry
.
getClass
());
}
}
...
...
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