Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
mbe-tools
TTool
Commits
9b429283
Commit
9b429283
authored
10 months ago
by
Ludovic Apvrille
Browse files
Options
Downloads
Patches
Plain Diff
Bug on avatardraw from cli: solved
parent
32c3c8ba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/cli/Action.java
+5
-0
5 additions, 0 deletions
src/main/java/cli/Action.java
src/main/java/cli/Interpreter.java
+15
-0
15 additions, 0 deletions
src/main/java/cli/Interpreter.java
with
20 additions
and
0 deletions
src/main/java/cli/Action.java
+
5
−
0
View file @
9b429283
...
@@ -1604,6 +1604,11 @@ public class Action extends Command implements ProVerifOutputListener {
...
@@ -1604,6 +1604,11 @@ public class Action extends Command implements ProVerifOutputListener {
return
Interpreter
.
TTOOL_NOT_STARTED
;
return
Interpreter
.
TTOOL_NOT_STARTED
;
}
}
if
(!
interpreter
.
hasAModel
())
{
return
Interpreter
.
TTOOL_NO_MODEL
;
}
AvatarSpecification
spec
=
as
;
AvatarSpecification
spec
=
as
;
if
(
spec
==
null
)
{
if
(
spec
==
null
)
{
spec
=
interpreter
.
mgui
.
gtm
.
getAvatarSpecification
();
spec
=
interpreter
.
mgui
.
gtm
.
getAvatarSpecification
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cli/Interpreter.java
+
15
−
0
View file @
9b429283
...
@@ -44,6 +44,7 @@ import myutil.Terminal;
...
@@ -44,6 +44,7 @@ import myutil.Terminal;
import
myutil.TerminalProviderInterface
;
import
myutil.TerminalProviderInterface
;
import
myutil.TraceManager
;
import
myutil.TraceManager
;
import
ui.MainGUI
;
import
ui.MainGUI
;
import
ui.TGUIAction
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Scanner
;
import
java.util.Scanner
;
...
@@ -70,6 +71,7 @@ public class Interpreter implements Runnable, TerminalProviderInterface {
...
@@ -70,6 +71,7 @@ public class Interpreter implements Runnable, TerminalProviderInterface {
public
final
static
String
BAD_VAR_NAME
=
"Invalid variable name"
;
public
final
static
String
BAD_VAR_NAME
=
"Invalid variable name"
;
public
final
static
String
UNKNOWN_NEXT_COMMAND
=
"Invalid action: "
;
public
final
static
String
UNKNOWN_NEXT_COMMAND
=
"Invalid action: "
;
public
final
static
String
TTOOL_NOT_STARTED
=
"TTool is not yet started. Cannot execute command."
;
public
final
static
String
TTOOL_NOT_STARTED
=
"TTool is not yet started. Cannot execute command."
;
public
final
static
String
TTOOL_NO_MODEL
=
"TTool is started no model has been created. Execute new or load a model"
;
public
final
static
String
TTOOL_ALREADY_STARTED
=
"TTool is already started. Cannot execute command."
;
public
final
static
String
TTOOL_ALREADY_STARTED
=
"TTool is already started. Cannot execute command."
;
public
final
static
String
BAD_COMMAND_NAME
=
"The provided command is invalid"
;
public
final
static
String
BAD_COMMAND_NAME
=
"The provided command is invalid"
;
public
final
static
String
ROBOT_EXCEPTION
=
"Robot could not be started"
;
public
final
static
String
ROBOT_EXCEPTION
=
"Robot could not be started"
;
...
@@ -317,6 +319,19 @@ public class Interpreter implements Runnable, TerminalProviderInterface {
...
@@ -317,6 +319,19 @@ public class Interpreter implements Runnable, TerminalProviderInterface {
return
ttoolStarted
;
return
ttoolStarted
;
}
}
public
boolean
hasAModel
()
{
if
(!
isTToolStarted
())
{
return
false
;
}
if
(
mgui
==
null
)
{
return
false
;
}
return
mgui
.
actions
[
TGUIAction
.
ACT_SAVE_AS_MODEL
].
isEnabled
();
}
public
void
setTToolStarted
(
boolean
b
)
{
public
void
setTToolStarted
(
boolean
b
)
{
ttoolStarted
=
b
;
ttoolStarted
=
b
;
}
}
...
...
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