Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
6b4d6907
Commit
6b4d6907
authored
Jul 29, 2020
by
Christina
Browse files
use class as simulation parameter
parent
6ea9adb4
Pipeline
#301111
failed with stages
in 2 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
VadereGui/src/org/vadere/gui/projectview/view/TextView.java
View file @
6b4d6907
...
...
@@ -281,7 +281,7 @@ public class TextView extends JPanel implements IJsonView {
switch
(
attributeType
)
{
case
MODEL:
textfileTextarea
.
setText
(
StateJsonConverter
.
serializeMainModelAttributesModelBundle
(
scenario
.
getModelAttributes
(),
scenario
.
getScenarioStore
().
getMainModel
()));
scenario
.
getModelAttributes
(),
scenario
.
getScenarioStore
().
getMainModel
()
,
scenario
.
getScenarioStore
().
getStrategyModel
()
));
break
;
case
SIMULATION:
textfileTextarea
...
...
VadereState/src/org/vadere/state/util/StateJsonConverter.java
View file @
6b4d6907
...
...
@@ -359,9 +359,11 @@ public abstract class StateJsonConverter {
return
prettyWriter
.
writeValueAsString
(
serializeTopographyToNode
(
topography
));
}
public
static
String
serializeMainModelAttributesModelBundle
(
List
<
Attributes
>
attributesList
,
String
mainModel
)
public
static
String
serializeMainModelAttributesModelBundle
(
List
<
Attributes
>
attributesList
,
String
mainModel
,
String
strategyModel
)
throws
JsonProcessingException
{
ObjectNode
node
=
mapper
.
createObjectNode
();
node
.
put
(
"strategyModel"
,
strategyModel
);
node
.
put
(
MAIN_MODEL_KEY
,
mainModel
);
node
.
set
(
"attributesModel"
,
serializeAttributesModelToNode
(
attributesList
));
return
prettyWriter
.
writeValueAsString
(
node
);
...
...
Write
Preview
Supports
Markdown
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