Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-11-22 07:47:46 +0000
committerHenrik Rentz-Reichert2012-11-22 07:47:46 +0000
commit589d8f49b0aee217c64a455ed86847ae856260d8 (patch)
treeadb937aba464328fbd745215b01858e85f1fdf9a /plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice
parent0fe4d0820b332d206b821906ca3a3e2bbf1c88df (diff)
downloadorg.eclipse.etrice-589d8f49b0aee217c64a455ed86847ae856260d8.tar.gz
org.eclipse.etrice-589d8f49b0aee217c64a455ed86847ae856260d8.tar.xz
org.eclipse.etrice-589d8f49b0aee217c64a455ed86847ae856260d8.zip
[generator, generator.config, generator.java] bug fix for instance path
The new instance path has as first segment the sub system ref name rather than the sub system class name as before. Therefore as an intermediate work around for configuration the first segment is replaced by the old value.
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice')
-rw-r--r--plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
index e7b0e7588..0981c3ef4 100644
--- a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
+++ b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
@@ -35,6 +35,7 @@ import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.etrice.core.config.ConfigModel
import com.google.inject.Inject
import org.eclipse.xtext.scoping.impl.ImportUriResolver
+import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance
class DataConfiguration implements IDataConfiguration {
@@ -81,12 +82,12 @@ class DataConfiguration implements IDataConfiguration {
}
override getAttrInstanceConfigValue(ActorInstance ai, List<Attribute> path) {
- var id = ai.path+"/"+path.toStringPath
+ var id = ai.subsyspath+"/"+path.toStringPath
DataConfigurationHelper::actorInstanceAttrMap.get(id)?.value?.toStringExpr
}
override getAttrInstanceConfigValue(ActorInstance ai, InterfaceItem port, List<Attribute> path) {
- var id = ai.path+"/"+port.name+"/"+path.toStringPath
+ var id = ai.subsyspath+"/"+port.name+"/"+path.toStringPath
DataConfigurationHelper::actorInstanceAttrMap.get(id)?.value?.toStringExpr
}
@@ -177,4 +178,12 @@ class DataConfiguration implements IDataConfiguration {
}
}
+ // TODO: this has to be replaced by a simple ai.path later
+ def subsyspath(ActorInstance ai) {
+ var parent = ai.eContainer
+ while (! (parent instanceof SubSystemInstance))
+ parent = parent.eContainer
+ ai.path.replaceFirst("/[a-zA-Z_]+/", "/"+(parent as SubSystemInstance).subSystemClass.name+"/")
+ }
+
} \ No newline at end of file

Back to the top