summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2012-12-12 10:02:49 (EST)
committerJuergen Haug2012-12-12 10:02:49 (EST)
commit13e48a31dba2985660abdbf3120ef2ca93557f69 (patch)
tree0447468bed9ecd0bc9a273869be402f4298f19b3
parent771bf9fcd7f57013960c934c2addf2f37bd091e7 (diff)
downloadorg.eclipse.etrice-13e48a31dba2985660abdbf3120ef2ca93557f69.zip
org.eclipse.etrice-13e48a31dba2985660abdbf3120ef2ca93557f69.tar.gz
org.eclipse.etrice-13e48a31dba2985660abdbf3120ef2ca93557f69.tar.bz2
[generator] updated java subsystem instance pathrefs/changes/99/9199/1
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend
index 3a3057f..9dee4fb 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend
@@ -18,6 +18,7 @@ import org.eclipse.etrice.core.genmodel.etricegen.Root
import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance
import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.generic.RoomExtensions
+import org.eclipse.etrice.core.genmodel.etricegen.SystemInstance
@Singleton
class SubSystemRunnerGen {
@@ -54,11 +55,19 @@ class SubSystemRunnerGen {
*/
public static void main(String[] args) {
// instantiate the main component
- «cc.name» main_component = new «cc.name»("«ssc.name»");
+ «cc.name» main_component = new «cc.name»("«ssc.runtimeName»");
run(main_component, args);
}
};
'''
+ }
+
+ def private getRuntimeName(SubSystemInstance ssc){
+ var parent = ssc.eContainer
+ switch parent{
+ SystemInstance: parent.name+"/"+ssc.name
+ default: ssc.name
+ }
}
} \ No newline at end of file