Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-11-22 10:25:37 -0500
committerHenrik Rentz-Reichert2012-11-22 10:25:37 -0500
commitd76122f82f7a02ca989c78d4537368a3db6077f8 (patch)
tree46676f22189975d1620409252d8c5e84892ab087 /plugins/org.eclipse.etrice.generator.config
parent34f8b2a6291a6476a81de2ba66d0554795f7d49b (diff)
downloadorg.eclipse.etrice-d76122f82f7a02ca989c78d4537368a3db6077f8.tar.gz
org.eclipse.etrice-d76122f82f7a02ca989c78d4537368a3db6077f8.tar.xz
org.eclipse.etrice-d76122f82f7a02ca989c78d4537368a3db6077f8.zip
[generator, generator.config, generator.java] removed work-around
When using the configuration currently *no* LogicalSystem must be defined!
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.config')
-rw-r--r--plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend13
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java32
2 files changed, 6 insertions, 39 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 0981c3ef4..e7b0e7588 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,7 +35,6 @@ 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 {
@@ -82,12 +81,12 @@ class DataConfiguration implements IDataConfiguration {
}
override getAttrInstanceConfigValue(ActorInstance ai, List<Attribute> path) {
- var id = ai.subsyspath+"/"+path.toStringPath
+ var id = ai.path+"/"+path.toStringPath
DataConfigurationHelper::actorInstanceAttrMap.get(id)?.value?.toStringExpr
}
override getAttrInstanceConfigValue(ActorInstance ai, InterfaceItem port, List<Attribute> path) {
- var id = ai.subsyspath+"/"+port.name+"/"+path.toStringPath
+ var id = ai.path+"/"+port.name+"/"+path.toStringPath
DataConfigurationHelper::actorInstanceAttrMap.get(id)?.value?.toStringExpr
}
@@ -178,12 +177,4 @@ 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
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 be5d41bf6..45e8f6405 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,7 +24,6 @@ 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;
@@ -140,8 +139,8 @@ public class DataConfiguration implements IDataConfiguration {
public String getAttrInstanceConfigValue(final ActorInstance ai, final List<Attribute> path) {
String _xblockexpression = null;
{
- String _subsyspath = this.subsyspath(ai);
- String _plus = (_subsyspath + "/");
+ String _path = ai.getPath();
+ String _plus = (_path + "/");
String _stringPath = this.toStringPath(path);
String id = (_plus + _stringPath);
AttrInstanceConfig _get = DataConfigurationHelper.actorInstanceAttrMap.get(id);
@@ -155,8 +154,8 @@ public class DataConfiguration implements IDataConfiguration {
public String getAttrInstanceConfigValue(final ActorInstance ai, final InterfaceItem port, final List<Attribute> path) {
String _xblockexpression = null;
{
- String _subsyspath = this.subsyspath(ai);
- String _plus = (_subsyspath + "/");
+ String _path = ai.getPath();
+ String _plus = (_path + "/");
String _name = port.getName();
String _plus_1 = (_plus + _name);
String _plus_2 = (_plus_1 + "/");
@@ -370,27 +369,4 @@ 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