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
de270513
Commit
de270513
authored
Feb 06, 2014
by
Thibaut Démare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug issue with list
parent
0172adf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src-gama-test/gama_model/models/test.gaml
src-gama-test/gama_model/models/test.gaml
+1
-1
src/org/graphstream/gama/extension/sender/AddEdgeAttributeStatement.java
...ream/gama/extension/sender/AddEdgeAttributeStatement.java
+9
-2
No files found.
src-gama-test/gama_model/models/test.gaml
View file @
de270513
...
...
@@ -37,7 +37,7 @@ global {
//
A
boolean
attribute
gs_add_edge_attribute
gs_sender_id
:
"test1"
gs_edge_id
:
"edge1"
gs_attribute_name
:
"boolean"
gs_attribute_value
:
true
;
//
A
list
attribute
//
gs_add_edge_attribute
gs_sender_id
:
"test1"
gs_edge_id
:
"edge1"
gs_attribute_name
:
"list"
gs_attribute_value
:[
"one"
,
"two"
,
"three"
];
gs_add_edge_attribute
gs_sender_id
:
"test1"
gs_edge_id
:
"edge1"
gs_attribute_name
:
"list"
gs_attribute_value
:[
1
,
2
,
3
];
//
Step
gs_step
gs_sender_id
:
"test1"
gs_step_number
:
1
;
...
...
src/org/graphstream/gama/extension/sender/AddEdgeAttributeStatement.java
View file @
de270513
...
...
@@ -22,7 +22,7 @@ import org.graphstream.gama.extension.IKeywordGSAdditional;
@facets
(
value
=
{
@facet
(
name
=
IKeywordGSAdditional
.
SENDERID
,
type
=
IType
.
STRING
,
optional
=
false
),
@facet
(
name
=
IKeywordGSAdditional
.
EDGE_ID
,
type
=
IType
.
STRING
,
optional
=
false
),
@facet
(
name
=
IKeywordGSAdditional
.
ATTRIBUTE_NAME
,
type
=
IType
.
STRING
,
optional
=
false
),
@facet
(
name
=
IKeywordGSAdditional
.
ATTRIBUTE_VALUE
,
type
=
IType
.
NONE
,
optional
=
false
)})
@facet
(
name
=
IKeywordGSAdditional
.
ATTRIBUTE_VALUE
,
type
=
IType
.
LIST
,
optional
=
false
)})
public
class
AddEdgeAttributeStatement
extends
AbstractStatement
implements
IStatement
{
final
IExpression
senderid
;
...
...
@@ -45,7 +45,14 @@ public class AddEdgeAttributeStatement extends AbstractStatement implements ISta
String
an
=
(
String
)(
attname
.
value
(
scope
));
Object
av
=
attval
.
value
(
scope
);
GSSender
sender
=
GSManager
.
getSender
(
s
);
sender
.
sendEdgeAttributeAdded
(
eid
,
an
,
av
);
// If it is a GamaList, it must be cast to an array
if
(
av
instanceof
msi
.
gama
.
util
.
GamaList
){
Object
[]
av_ar
=
((
msi
.
gama
.
util
.
GamaList
)
av
).
toArray
();
sender
.
sendEdgeAttributeAdded
(
eid
,
an
,
av_ar
);
}
else
{
sender
.
sendEdgeAttributeAdded
(
eid
,
an
,
av
);
}
return
null
;
}
...
...
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