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
0c2896e4
Commit
0c2896e4
authored
4 years ago
by
dgelessus
Browse files
Options
Downloads
Patches
Plain Diff
Use new ProB 2 API methods for handling pretty operation names
parent
ae69755e
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/CommandUtils.java
+0
-26
0 additions, 26 deletions
src/main/java/de/prob2/jupyter/CommandUtils.java
src/main/java/de/prob2/jupyter/commands/ExecCommand.java
+2
-3
2 additions, 3 deletions
src/main/java/de/prob2/jupyter/commands/ExecCommand.java
with
2 additions
and
29 deletions
src/main/java/de/prob2/jupyter/CommandUtils.java
+
0
−
26
View file @
0c2896e4
...
@@ -54,32 +54,6 @@ public final class CommandUtils {
...
@@ -54,32 +54,6 @@ public final class CommandUtils {
throw
new
AssertionError
(
"Utility class"
);
throw
new
AssertionError
(
"Utility class"
);
}
}
public
static
@NotNull
String
prettyOperationName
(
final
@NotNull
String
name
)
{
switch
(
name
)
{
case
"$setup_constants"
:
return
"SETUP_CONSTANTS"
;
case
"$initialise_machine"
:
return
"INITIALISATION"
;
default
:
return
name
;
}
}
public
static
@NotNull
String
unprettyOperationName
(
final
@NotNull
String
name
)
{
switch
(
name
)
{
case
"SETUP_CONSTANTS"
:
return
"$setup_constants"
;
case
"INITIALISATION"
:
return
"$initialise_machine"
;
default
:
return
name
;
}
}
/**
/**
* <p>
* <p>
* Split an argument string according to the given parameter specification.
* Split an argument string according to the given parameter specification.
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/prob2/jupyter/commands/ExecCommand.java
+
2
−
3
View file @
0c2896e4
...
@@ -71,7 +71,7 @@ public final class ExecCommand implements Command {
...
@@ -71,7 +71,7 @@ public final class ExecCommand implements Command {
@Override
@Override
public
@NotNull
DisplayData
run
(
final
@NotNull
ParsedArguments
args
)
{
public
@NotNull
DisplayData
run
(
final
@NotNull
ParsedArguments
args
)
{
final
Trace
trace
=
this
.
animationSelector
.
getCurrentTrace
();
final
Trace
trace
=
this
.
animationSelector
.
getCurrentTrace
();
final
String
translatedOpName
=
CommandUtils
.
unprettyOperation
Name
(
args
.
get
(
OPERATION_PARAM
));
final
String
translatedOpName
=
Transition
.
unprettify
Name
(
args
.
get
(
OPERATION_PARAM
));
final
String
predicate
;
final
String
predicate
;
if
(!
args
.
get
(
PREDICATE_PARAM
).
isPresent
())
{
if
(!
args
.
get
(
PREDICATE_PARAM
).
isPresent
())
{
predicate
=
"1=1"
;
predicate
=
"1=1"
;
...
@@ -103,8 +103,7 @@ public final class ExecCommand implements Command {
...
@@ -103,8 +103,7 @@ public final class ExecCommand implements Command {
final
List
<
String
>
opNames
=
this
.
animationSelector
.
getCurrentTrace
()
final
List
<
String
>
opNames
=
this
.
animationSelector
.
getCurrentTrace
()
.
getNextTransitions
()
.
getNextTransitions
()
.
stream
()
.
stream
()
.
map
(
Transition:
:
getName
)
.
map
(
Transition:
:
getPrettyName
)
.
map
(
CommandUtils:
:
prettyOperationName
)
.
distinct
()
.
distinct
()
.
filter
(
s
->
s
.
startsWith
(
prefix
))
.
filter
(
s
->
s
.
startsWith
(
prefix
))
.
sorted
()
.
sorted
()
...
...
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