Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend')
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend
index 54a6449ba..1f5e3e584 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend
@@ -20,6 +20,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.generator.generic.ConfigExtension
import org.eclipse.etrice.generator.generic.ProcedureHelpers
@@ -32,6 +33,7 @@ class SubSystemClassGen {
@Inject extension JavaIoFileSystemAccess fileAccess
@Inject extension JavaExtensions stdExt
@Inject extension RoomExtensions roomExt
+ @Inject extension ConfigExtension configExt
@Inject extension ProcedureHelpers helpers
@Inject ILogger logger
@@ -163,6 +165,20 @@ class SubSystemClassGen {
}
);
«ENDFOR»
+
+ // apply instance attribute configurations
+ «FOR ai : comp.allContainedInstances»
+ «var attrConfigs = ai.getConfigAttributes()»
+ «IF !attrConfigs.empty»
+ {
+ «var aiName = "inst"»
+ «ai.actorClass.name» «aiName» = («ai.actorClass.name») instances[«comp.allContainedInstances.indexOf(ai)»];
+ «FOR attrConfig : attrConfigs»
+ «aiName».«attrConfig.attribute.invokeSetter(ai.actorClass.name, attrConfig.value.stringValue(attrConfig.attribute))»;
+ «ENDFOR»
+ }
+ «ENDIF»
+ «ENDFOR»
// create the subsystem system port
RTSystemPort = new RTSystemServicesProtocolConjPortRepl(this, "RTSystemPort",

Back to the top