summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2012-11-08 10:51:16 (EST)
committerJuergen Haug2012-11-08 10:51:16 (EST)
commit81f5a744f74c664952750abd74b306f5c84fad89 (patch)
tree436097f345ba0e11037ba09206d97b56bdea6908
parent0f233b0b11dbc6b1bbaf28e238f56c4371d58f0d (diff)
downloadorg.eclipse.etrice-81f5a744f74c664952750abd74b306f5c84fad89.zip
org.eclipse.etrice-81f5a744f74c664952750abd74b306f5c84fad89.tar.gz
org.eclipse.etrice-81f5a744f74c664952750abd74b306f5c84fad89.tar.bz2
[CQ 6485][generator, tests] update models, fixrefs/changes/02/8602/1
-rw-r--r--plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java16
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ConfigTest.room14
2 files changed, 17 insertions, 13 deletions
diff --git a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java
index bb768ad..25e0d6b 100644
--- a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java
+++ b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java
@@ -149,12 +149,16 @@ public class DataConfigurationHelper {
private static void collectConfigs(ProtocolClassConfig protocolConfig,
Map<String, AttrClassConfig> map) {
String path = "/" + protocolConfig.getProtocol().getName();
- for (AttrClassConfig c : protocolConfig.getRegular().getAttributes())
- collectConfigs(c, path + "/regular/" + c.getAttribute().getName(),
- map);
- for (AttrClassConfig c : protocolConfig.getConjugated().getAttributes())
- collectConfigs(c, path + "/conjugated/"
- + c.getAttribute().getName(), map);
+ if (protocolConfig.getRegular() != null)
+ for (AttrClassConfig c : protocolConfig.getRegular()
+ .getAttributes())
+ collectConfigs(c, path + "/regular/"
+ + c.getAttribute().getName(), map);
+ if (protocolConfig.getConjugated() != null)
+ for (AttrClassConfig c : protocolConfig.getConjugated()
+ .getAttributes())
+ collectConfigs(c, path + "/conjugated/"
+ + c.getAttribute().getName(), map);
}
private static void collectConfigs(ActorClassConfig actorConfig,
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ConfigTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/ConfigTest.room
index 2d3cd15..1d93fdd 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/ConfigTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ConfigTest.room
@@ -128,16 +128,16 @@ RoomModel ConfigTest {
Attribute float_c: float64 = "22.22"
Attribute float_i: float64 = "33.33"
- Attribute char_r: char = "'R'"
- Attribute char_c: char = "'C'"
- Attribute char_i: char = "'I'"
+ Attribute char_r: char = "R"
+ Attribute char_c: char = "C"
+ Attribute char_i: char = "I"
- Attribute charArray_r[20] : char = "\"ROOM will bloom\".toCharArray()"
+ Attribute charArray_r[20] : char = "ROOM will bloom"
Attribute charArray_c [ 20 ]: char = "ROOM Zoom"
Attribute charArray_i [ 20 ]: char = "ROOM Boom"
- Attribute string_r : string = "\":/\""
- Attribute string_c : string = "\":)\""
- Attribute string_i : string = "\":]\""
+ Attribute string_r : string = ":/"
+ Attribute string_c : string = ":)"
+ Attribute string_i : string = ":]"
Attribute array1_r [ 1 ]: int32 = "0"
Attribute array1_c [ 1 ]: int32 = "0"
Attribute array1_i [ 1 ]: int32 = "0"