diff --git a/org.contextmapper.dsl.tests/src/org/contextmapper/dsl/generators/plantuml/PlantUMLValueImpactMapDiagramCreatorTest.java b/org.contextmapper.dsl.tests/src/org/contextmapper/dsl/generators/plantuml/PlantUMLValueImpactMapDiagramCreatorTest.java index 06aa9a44..61ff2577 100644 --- a/org.contextmapper.dsl.tests/src/org/contextmapper/dsl/generators/plantuml/PlantUMLValueImpactMapDiagramCreatorTest.java +++ b/org.contextmapper.dsl.tests/src/org/contextmapper/dsl/generators/plantuml/PlantUMLValueImpactMapDiagramCreatorTest.java @@ -52,6 +52,9 @@ public void canCreateValueImpactMapDiagramDiagramWithoutBoundedContext() throws + " .green {" + System.lineSeparator() + " BackgroundColor lightgreen" + System.lineSeparator() + " }" + System.lineSeparator() + + " .yellow {" + System.lineSeparator() + + " BackgroundColor gold" + System.lineSeparator() + + " }" + System.lineSeparator() + " .red {" + System.lineSeparator() + " BackgroundColor tomato" + System.lineSeparator() + " }" + System.lineSeparator() @@ -66,7 +69,7 @@ public void canCreateValueImpactMapDiagramDiagramWithoutBoundedContext() throws + "----" + System.lineSeparator() + "Priority HIGH" + System.lineSeparator() + "Impact HIGH" + System.lineSeparator() - + ";" + System.lineSeparator() + + "; <>" + System.lineSeparator() + "@endmindmap" + System.lineSeparator(), valueImpactMapDiagram); } @@ -90,6 +93,9 @@ public void canCreateSimpleValueImpactMapDiagram() throws IOException { + " .green {" + System.lineSeparator() + " BackgroundColor lightgreen" + System.lineSeparator() + " }" + System.lineSeparator() + + " .yellow {" + System.lineSeparator() + + " BackgroundColor gold" + System.lineSeparator() + + " }" + System.lineSeparator() + " .red {" + System.lineSeparator() + " BackgroundColor tomato" + System.lineSeparator() + " }" + System.lineSeparator() @@ -133,6 +139,9 @@ public void canCreateSimpleValueImpactMapDiagram4ValueCluster() throws IOExcepti + " .green {" + System.lineSeparator() + " BackgroundColor lightgreen" + System.lineSeparator() + " }" + System.lineSeparator() + + " .yellow {" + System.lineSeparator() + + " BackgroundColor gold" + System.lineSeparator() + + " }" + System.lineSeparator() + " .red {" + System.lineSeparator() + " BackgroundColor tomato" + System.lineSeparator() + " }" + System.lineSeparator() @@ -176,6 +185,9 @@ public void canRespectValuesInValueClusters() throws IOException { + " .green {" + System.lineSeparator() + " BackgroundColor lightgreen" + System.lineSeparator() + " }" + System.lineSeparator() + + " .yellow {" + System.lineSeparator() + + " BackgroundColor gold" + System.lineSeparator() + + " }" + System.lineSeparator() + " .red {" + System.lineSeparator() + " BackgroundColor tomato" + System.lineSeparator() + " }" + System.lineSeparator() @@ -231,6 +243,9 @@ public void canHandleRecurringStakeholders() throws IOException { + " .green {" + System.lineSeparator() + " BackgroundColor lightgreen" + System.lineSeparator() + " }" + System.lineSeparator() + + " .yellow {" + System.lineSeparator() + + " BackgroundColor gold" + System.lineSeparator() + + " }" + System.lineSeparator() + " .red {" + System.lineSeparator() + " BackgroundColor tomato" + System.lineSeparator() + " }" + System.lineSeparator() diff --git a/org.contextmapper.dsl.ui/samples/freemarker/csv-files/value-registers.csv.ftl b/org.contextmapper.dsl.ui/samples/freemarker/csv-files/value-registers.csv.ftl index bfa152fe..a6c75dde 100644 --- a/org.contextmapper.dsl.ui/samples/freemarker/csv-files/value-registers.csv.ftl +++ b/org.contextmapper.dsl.ui/samples/freemarker/csv-files/value-registers.csv.ftl @@ -1,4 +1,4 @@ -Value Register,Context,Value Cluster,Core Value,Demonstrators,Related Values,Opposing Values,Value,isCore,Demonstrators,Related Values,Opposing Values,Stakeholder(s),Priority,Impact,Consequence Type,Consequence,Action Type, Action +Value Register,Context,Value Cluster,Core Value,Demonstrators,Related Values,Opposing Values,Value,coreValue,Demonstrators,Related Values,Opposing Values,Stakeholder(s),Priority,Impact,Consequence Type,Consequence,Action Type, Action <#list valueRegisters as valueRegister> <#if valueRegister.context?has_content><#assign valueRegisterContext = valueRegister.context.name!""><#else><#assign valueRegisterContext = ""> <#list valueRegister.valueClusters as valueCluster> @@ -32,17 +32,17 @@ ${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueCluste <#if stakeholderElicitation.consequences?has_content> <#list stakeholderElicitation.consequences as consequence> <#if consequence.action?has_content> -${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},${consequence.action.type!""},${consequence.action.action!""} +${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},${consequence.action.type!""},${consequence.action.action!""} <#else> -${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},, +${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},, <#else> -${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},,,, +${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},,,, <#else> -${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},,,,,,,, +${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueClusterCoreValue},${valueClusterDemonstrators},${valueClusterRelatedValues},${valueClusterOpposingValues},${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},,,,,,,, @@ -55,17 +55,17 @@ ${valueRegister.name},${valueRegisterContext},${valueCluster.name},${valueCluste <#if stakeholderElicitation.consequences?has_content> <#list stakeholderElicitation.consequences as consequence> <#if consequence.action?has_content> -${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},${consequence.action.type!""},${consequence.action.action!""} +${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},${consequence.action.type!""},${consequence.action.action!""} <#else> -${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},, +${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},${consequence.type!""},${consequence.consequence},, <#else> -${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},,,, +${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},${stakeholderElicitation.stakeholder.name},${stakeholderElicitation.priority!""},${stakeholderElicitation.impact!""},,,, <#else> -${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.isCore?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},,,,,,,, +${valueRegister.name},${valueRegisterContext},,,,,,${value.name},${value.coreValue?string("yes", "no")},${valueDemonstrators},${valueRelatedValues},${valueOpposingValues},,,,,,,, \ No newline at end of file diff --git a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext index 5ea354ef..cebd031b 100644 --- a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext +++ b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext @@ -420,7 +420,7 @@ ValueCluster: Value: 'Value' name=ID (OPEN ( - (isCore ?= 'isCore')? & + (coreValue ?= 'isCore')? & ('demonstrator' ('=')? demonstrators += STRING)* & ('relatedValue' ('=')? relatedValues += STRING)* & ('opposingValue' ('=')? opposingValues += STRING)* & diff --git a/org.contextmapper.dsl/src/org/contextmapper/dsl/generator/plantuml/value_impact_mapping/value-impact-map-puml.ftl b/org.contextmapper.dsl/src/org/contextmapper/dsl/generator/plantuml/value_impact_mapping/value-impact-map-puml.ftl index 35bae0a9..def5df58 100644 --- a/org.contextmapper.dsl/src/org/contextmapper/dsl/generator/plantuml/value_impact_mapping/value-impact-map-puml.ftl +++ b/org.contextmapper.dsl/src/org/contextmapper/dsl/generator/plantuml/value_impact_mapping/value-impact-map-puml.ftl @@ -9,6 +9,9 @@ mindmapDiagram { .green { BackgroundColor lightgreen } + .yellow { + BackgroundColor gold + } .red { BackgroundColor tomato } @@ -47,7 +50,7 @@ Impact ${value.impact} -- <#if value.consequenceType == "GOOD">Positive Consequences<#elseif value.consequenceType == "BAD">Negative Consequences<#else>Consequences -- ${value.consequence} -;<#if value.consequenceType == "GOOD"> <><#elseif value.consequenceType == "BAD"> <> +;<#if value.consequenceType == "GOOD"> <><#elseif value.consequenceType == "BAD"> <><#else> <> <#list value.mitigationActions as mitigationAction> **** ${mitigationAction.actionType}: ${mitigationAction.action}