Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gs-gama
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
graphstream
gs-gama
Commits
d158f144
Commit
d158f144
authored
Feb 10, 2014
by
Thibaut Démare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the 'return' keyword used with a custom keyword
parent
66280f79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/org/graphstream/gama/extension/IKeywordGSAdditional.java
src/org/graphstream/gama/extension/IKeywordGSAdditional.java
+1
-0
src/org/graphstream/gama/extension/receiver/WaitStepStatement.java
...raphstream/gama/extension/receiver/WaitStepStatement.java
+3
-3
No files found.
src/org/graphstream/gama/extension/IKeywordGSAdditional.java
View file @
d158f144
...
...
@@ -41,6 +41,7 @@ public class IKeywordGSAdditional implements IKeyword {
public
static
final
String
NODE_ID_TO
=
"gs_node_id_to"
;
public
static
final
String
PORT
=
"gs_port"
;
public
static
final
String
RECEIVERID
=
"gs_receiver_id"
;
public
static
final
String
RETURN
=
"gs_return"
;
public
static
final
String
SENDERID
=
"gs_sender_id"
;
public
static
final
String
STEP_NUMBER
=
"gs_step_number"
;
}
src/org/graphstream/gama/extension/receiver/WaitStepStatement.java
View file @
d158f144
...
...
@@ -21,7 +21,7 @@ import org.graphstream.gama.extension.IKeywordGSAdditional;
@symbol
(
name
=
IKeywordGSAdditional
.
WAIT_STEP
,
kind
=
ISymbolKind
.
SINGLE_STATEMENT
,
with_sequence
=
false
)
@inside
(
kinds
=
{
ISymbolKind
.
BEHAVIOR
,
ISymbolKind
.
SINGLE_STATEMENT
})
@facets
(
value
=
{
@facet
(
name
=
IKeywordGSAdditional
.
RECEIVERID
,
type
=
IType
.
STRING
,
optional
=
false
),
@facet
(
name
=
IKeyword
.
RETURN
,
type
=
IType
.
NEW_TEMP_ID
,
optional
=
false
)})
@facet
(
name
=
IKeyword
GSAdditional
.
RETURN
,
type
=
IType
.
NEW_TEMP_ID
,
optional
=
false
)})
public
class
WaitStepStatement
extends
AbstractStatement
implements
IStatement
{
final
IExpression
receiverid
;
...
...
@@ -30,14 +30,14 @@ public class WaitStepStatement extends AbstractStatement implements IStatement{
public
WaitStepStatement
(
IDescription
desc
)
{
super
(
desc
);
receiverid
=
getFacet
(
IKeywordGSAdditional
.
RECEIVERID
);
returnVal
=
getLiteral
(
IKeyword
.
RETURN
);
returnVal
=
getLiteral
(
IKeyword
GSAdditional
.
RETURN
);
}
@Override
protected
Object
privateExecuteIn
(
IScope
scope
)
throws
GamaRuntimeException
{
String
r
=
(
String
)(
receiverid
.
value
(
scope
));
GSReceiver
receiver
=
GSManager
.
getReceiver
(
r
);
Double
step
=
receiver
.
waitStep
(
);
Float
step
=
new
Float
(
receiver
.
waitStep
()
);
// and we return the attribute list
scope
.
setVarValue
(
returnVal
,
step
);
return
step
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment