Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-11-22 02:47:46 -0500
committerHenrik Rentz-Reichert2012-11-22 02:47:46 -0500
commit589d8f49b0aee217c64a455ed86847ae856260d8 (patch)
treeadb937aba464328fbd745215b01858e85f1fdf9a /plugins/org.eclipse.etrice.generator.config/xtend-gen/org
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/xtend-gen/org')
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java32
1 files changed, 28 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
index 45e8f6405..be5d41bf6 100644
--- a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
+++ b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
@@ -24,6 +24,7 @@ import org.eclipse.etrice.core.config.StringLiteral;
import org.eclipse.etrice.core.config.SubSystemConfig;
import org.eclipse.etrice.core.genmodel.base.ILogger;
import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance;
+import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance;
import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.Attribute;
import org.eclipse.etrice.core.room.InterfaceItem;
@@ -139,8 +140,8 @@ public class DataConfiguration implements IDataConfiguration {
public String getAttrInstanceConfigValue(final ActorInstance ai, final List<Attribute> path) {
String _xblockexpression = null;
{
- String _path = ai.getPath();
- String _plus = (_path + "/");
+ String _subsyspath = this.subsyspath(ai);
+ String _plus = (_subsyspath + "/");
String _stringPath = this.toStringPath(path);
String id = (_plus + _stringPath);
AttrInstanceConfig _get = DataConfigurationHelper.actorInstanceAttrMap.get(id);
@@ -154,8 +155,8 @@ public class DataConfiguration implements IDataConfiguration {
public String getAttrInstanceConfigValue(final ActorInstance ai, final InterfaceItem port, final List<Attribute> path) {
String _xblockexpression = null;
{
- String _path = ai.getPath();
- String _plus = (_path + "/");
+ String _subsyspath = this.subsyspath(ai);
+ String _plus = (_subsyspath + "/");
String _name = port.getName();
String _plus_1 = (_plus + _name);
String _plus_2 = (_plus_1 + "/");
@@ -369,4 +370,27 @@ public class DataConfiguration implements IDataConfiguration {
}
}
}
+
+ public String subsyspath(final ActorInstance ai) {
+ String _xblockexpression = null;
+ {
+ EObject parent = ai.eContainer();
+ boolean _not = (!(parent instanceof SubSystemInstance));
+ boolean _while = _not;
+ while (_while) {
+ EObject _eContainer = parent.eContainer();
+ parent = _eContainer;
+ boolean _not_1 = (!(parent instanceof SubSystemInstance));
+ _while = _not_1;
+ }
+ String _path = ai.getPath();
+ SubSystemClass _subSystemClass = ((SubSystemInstance) parent).getSubSystemClass();
+ String _name = _subSystemClass.getName();
+ String _plus = ("/" + _name);
+ String _plus_1 = (_plus + "/");
+ String _replaceFirst = _path.replaceFirst("/[a-zA-Z_]+/", _plus_1);
+ _xblockexpression = (_replaceFirst);
+ }
+ return _xblockexpression;
+ }
}

Back to the top