declared Singleton injection for m2m transformer classes

Signed-off-by: Sebastian Reiser <Sebastian.Reiser@de.bosch.com>
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/module/DefaultM2MInjectorModule.java b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/module/DefaultM2MInjectorModule.java
index 2ff7a01..e9ba724 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/module/DefaultM2MInjectorModule.java
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/module/DefaultM2MInjectorModule.java
@@ -16,135 +16,21 @@
 package module;
 
 import org.eclipse.app4mc.transformation.extensions.AbstractTransformationInjectorModule;
-import org.eclipse.app4mc.transformation.extensions.CustomObjectsStore;
 import org.eclipse.app4mc.transformation.extensions.base.templates.Model2ModelRootTransformer;
 
 import templates.m2m.Amlt2InchronTransformer;
-import templates.m2m.sw.ModeLabelTransformer;
-import templates.m2m.hw.CacheTransformer;
-import templates.m2m.hw.FrequencyDomainTransformer;
-import templates.m2m.hw.HWStructure_ECUTransformer;
-import templates.m2m.hw.HWStructure_MicroControllerTransformer;
-import templates.m2m.hw.HWStructure_SystemTransformer;
-import templates.m2m.hw.HWTransformer;
-import templates.m2m.hw.MemoryTransformer;
-import templates.m2m.hw.ProcessingUnitTransformer;
-import templates.m2m.mapping.MappingTransformer;
-import templates.m2m.os.OSTransformer;
-import templates.m2m.stimuli.StimuliTransformer;
-import templates.m2m.sw.CallGraphTransformer;
-import templates.m2m.sw.CustomEventTriggerTransformer;
-import templates.m2m.sw.GraphEntryBaseTransformer;
-import templates.m2m.sw.ISRTransformer;
-import templates.m2m.sw.ModeSwitchTransformer;
-import templates.m2m.sw.ModeValueDisjunctionTransformer;
-import templates.m2m.sw.RunnableItemTransformer;
-import templates.m2m.sw.RunnableTransformer;
-import templates.m2m.sw.SWTransformer;
-import templates.m2m.sw.TaskTransformer;
-import templates.m2m.sw.runnableItem.AsynchronousServerCallTransformer;
-import templates.m2m.sw.runnableItem.ChannelAccessTransformer;
-import templates.m2m.sw.runnableItem.ChannelReceiveTransformer;
-import templates.m2m.sw.runnableItem.ChannelSendTransformer;
-import templates.m2m.sw.runnableItem.ComputationItemTransformer;
-import templates.m2m.sw.runnableItem.ExecutionNeedTransformer;
-import templates.m2m.sw.runnableItem.GetResultServerCallTransformer;
-import templates.m2m.sw.runnableItem.GroupTransformer;
-import templates.m2m.sw.runnableItem.LabelAccessTransformer;
-import templates.m2m.sw.runnableItem.ModeLabelAccessTransformer;
-import templates.m2m.sw.runnableItem.RunnableCallTransformer;
-import templates.m2m.sw.runnableItem.RunnableModeSwitchTransformer;
-import templates.m2m.sw.runnableItem.RunnableProbablilitySwitchTransformer;
-import templates.m2m.sw.runnableItem.SemaphoreAccessTransformer;
-import templates.m2m.sw.runnableItem.SenderReceiverCommunicationTransformer;
-import templates.m2m.sw.runnableItem.SenderReceiverReadTransformer;
-import templates.m2m.sw.runnableItem.SenderReceiverWriteTransformer;
-import templates.m2m.sw.runnableItem.ServerCallTransformer;
-import templates.m2m.sw.runnableItem.SynchronousServerCallTransformer;
-import templates.m2m.sw.runnableItem.TicksTransformer;
-import templates.m2m.utils.FrequencyTransformer;
-import templates.m2m.utils.TimeTransformer;
 
 public class DefaultM2MInjectorModule extends AbstractTransformationInjectorModule {
 
 	@Override
 	protected void initializeBaseConfiguration() {
 		bind(Model2ModelRootTransformer.class).to(Amlt2InchronTransformer.class);
-		bind(CustomObjectsStore.class).toInstance(new CustomObjectsStore());
+		//bind(CustomObjectsStore.class).toInstance(new CustomObjectsStore());
 
 	}
 
 	@Override
-	protected void initializeTransformerObjects() {	
-		try {
-			//hw mode transformers
-			bind(CacheTransformer.class).toConstructor(CacheTransformer.class.getConstructor()).asEagerSingleton();
-			bind(FrequencyDomainTransformer.class).toConstructor(FrequencyDomainTransformer.class.getConstructor()).asEagerSingleton();
-			bind(HWStructure_ECUTransformer.class).toConstructor(HWStructure_ECUTransformer.class.getConstructor()).asEagerSingleton();
-			bind(HWStructure_MicroControllerTransformer.class).toConstructor(HWStructure_MicroControllerTransformer.class.getConstructor()).asEagerSingleton();
-			bind(HWStructure_SystemTransformer.class).toConstructor(HWStructure_SystemTransformer.class.getConstructor()).asEagerSingleton();
-			bind(HWTransformer.class).toConstructor(HWTransformer.class.getConstructor()).asEagerSingleton();
-			bind(MemoryTransformer.class).toConstructor(MemoryTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ProcessingUnitTransformer.class).toConstructor(ProcessingUnitTransformer.class.getConstructor()).asEagerSingleton();
-
-			//mapping model transformers
-			bind(MappingTransformer.class).toConstructor(MappingTransformer.class.getConstructor()).asEagerSingleton();
-
-			//os model transformers
-			bind(OSTransformer.class).toConstructor(OSTransformer.class.getConstructor()).asEagerSingleton();
-
-			//stimuli model transformers
-			bind(StimuliTransformer.class).toConstructor(StimuliTransformer.class.getConstructor()).asEagerSingleton();
-
-			//sw model transformers
-			bind(CallGraphTransformer.class).toConstructor(CallGraphTransformer.class.getConstructor()).asEagerSingleton();
-			bind(CustomEventTriggerTransformer.class).toConstructor(CustomEventTriggerTransformer.class.getConstructor()).asEagerSingleton();
-			bind(GraphEntryBaseTransformer.class).toConstructor(GraphEntryBaseTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ISRTransformer.class).toConstructor(ISRTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ModeLabelTransformer.class).toConstructor(ModeLabelTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ModeSwitchTransformer.class).toConstructor(ModeSwitchTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ModeValueDisjunctionTransformer.class).toConstructor(ModeValueDisjunctionTransformer.class.getConstructor()).asEagerSingleton();
-			bind(RunnableItemTransformer.class).toConstructor(RunnableItemTransformer.class.getConstructor()).asEagerSingleton();
-			bind(RunnableTransformer.class).toConstructor(RunnableTransformer.class.getConstructor()).asEagerSingleton();
-			bind(SWTransformer.class).toConstructor(SWTransformer.class.getConstructor()).asEagerSingleton();
-			bind(TaskTransformer.class).toConstructor(TaskTransformer.class.getConstructor()).asEagerSingleton();
-
-			//sw model runnables transformer
-			bind(AsynchronousServerCallTransformer.class).toConstructor(AsynchronousServerCallTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ChannelAccessTransformer.class).toConstructor(ChannelAccessTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ChannelReceiveTransformer.class).toConstructor(ChannelReceiveTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ChannelSendTransformer.class).toConstructor(ChannelSendTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ComputationItemTransformer.class).toConstructor(ComputationItemTransformer.class.getConstructor()).asEagerSingleton();
-			//bind(CustomEventTriggerTransformer.class).toConstructor(CustomEventTriggerTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ExecutionNeedTransformer.class).toConstructor(ExecutionNeedTransformer.class.getConstructor()).asEagerSingleton();
-			bind(GetResultServerCallTransformer.class).toConstructor(GetResultServerCallTransformer.class.getConstructor()).asEagerSingleton();
-			bind(GroupTransformer.class).toConstructor(GroupTransformer.class.getConstructor()).asEagerSingleton();
-			bind(LabelAccessTransformer.class).toConstructor(LabelAccessTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ModeLabelAccessTransformer.class).toConstructor(ModeLabelAccessTransformer.class.getConstructor()).asEagerSingleton();
-			bind(RunnableCallTransformer.class).toConstructor(RunnableCallTransformer.class.getConstructor()).asEagerSingleton();
-			bind(RunnableModeSwitchTransformer.class).toConstructor(RunnableModeSwitchTransformer.class.getConstructor()).asEagerSingleton();
-			bind(RunnableProbablilitySwitchTransformer.class).toConstructor(RunnableProbablilitySwitchTransformer.class.getConstructor()).asEagerSingleton();
-			bind(SemaphoreAccessTransformer.class).toConstructor(SemaphoreAccessTransformer.class.getConstructor()).asEagerSingleton();
-			bind(SenderReceiverCommunicationTransformer.class).toConstructor(SenderReceiverCommunicationTransformer.class.getConstructor()).asEagerSingleton();
-			bind(SenderReceiverReadTransformer.class).toConstructor(SenderReceiverReadTransformer.class.getConstructor()).asEagerSingleton();
-			bind(SenderReceiverWriteTransformer.class).toConstructor(SenderReceiverWriteTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ServerCallTransformer.class).toConstructor(ServerCallTransformer.class.getConstructor()).asEagerSingleton();
-			bind(SynchronousServerCallTransformer.class).toConstructor(SynchronousServerCallTransformer.class.getConstructor()).asEagerSingleton();
-			bind(TicksTransformer.class).toConstructor(TicksTransformer.class.getConstructor()).asEagerSingleton();
-			bind(ModeLabelTransformer.class).toConstructor(ModeLabelTransformer.class.getConstructor()).asEagerSingleton();
-			//utils
-			bind(FrequencyTransformer.class).toConstructor(FrequencyTransformer.class.getConstructor()).asEagerSingleton();
-			bind(TimeTransformer.class).toConstructor(TimeTransformer.class.getConstructor()).asEagerSingleton();
-			
-		} catch (NoSuchMethodException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-			return;
-		} catch (SecurityException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-			return;
-		}
+	protected void initializeTransformerObjects() {
 	}
 
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/AbstractAmaltheaInchronTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/AbstractAmaltheaInchronTransformer.xtend
index b47119d..2a0902a 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/AbstractAmaltheaInchronTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/AbstractAmaltheaInchronTransformer.xtend
@@ -25,19 +25,28 @@
 import org.eclipse.app4mc.transformation.extensions.base.templates.AbstractTransformer
 
 abstract class AbstractAmaltheaInchronTransformer extends AbstractTransformer {
-				
-	public var Model inchronModel;
 
-	public var Amalthea amaltheaModel
+	public def Amalthea getAmaltheaRoot(){
+		return (customObjsStore.getInstance(Amalthea) as Amalthea)
+	}
 
-	/*- Factory initiaization */
-	public val inchronRootFactory = RootFactory.eINSTANCE
+	public def Model getInchronRoot(){
+		return (customObjsStore.getInstance(Model) as Model)
+	}
+	
+	/*- Factory initialization */
+	public def getInchronRootFactory(){
+		return RootFactory.eINSTANCE}
 
-	public val inchronModelFactory = ModelFactory.eINSTANCE
+	public def getInchronModelFactory(){
+		ModelFactory.eINSTANCE}
 
-	public val inchronMemoryFactory = MemoryFactory.eINSTANCE
+	public def getInchronMemoryFactory(){
+		MemoryFactory.eINSTANCE}
 
-	public val inchronStimulationFactory = StimulationFactory.eINSTANCE
+	public def getInchronStimulationFactory(){
+		StimulationFactory.eINSTANCE}
 
-	public val amaltheaFactory = AmaltheaFactory.eINSTANCE
+	public def getAmaltheaFactory(){
+		AmaltheaFactory.eINSTANCE}
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/Amlt2InchronTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/Amlt2InchronTransformer.xtend
index a91212f..c8a3a72 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/Amlt2InchronTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/Amlt2InchronTransformer.xtend
@@ -17,41 +17,16 @@
 
 import com.google.inject.Inject
 import com.inchron.realtime.root.RootFactory
-import com.inchron.realtime.root.model.Model
-import com.inchron.realtime.root.model.ModelFactory
 import java.io.File
-import java.text.DateFormat
-import java.text.SimpleDateFormat
-import java.util.Date
-import java.util.Locale
 import org.eclipse.app4mc.amalthea.model.Amalthea
-import org.eclipse.app4mc.amalthea.model.StringObject
 import org.eclipse.app4mc.transformation.extensions.base.templates.Model2ModelRootTransformer
 import org.eclipse.emf.common.util.URI
 import org.eclipse.emf.ecore.resource.ResourceSet
-import templates.m2m.hw.HWTransformer
-import templates.m2m.mapping.MappingTransformer
-import templates.m2m.os.OSTransformer
-import templates.m2m.stimuli.StimuliTransformer
-import templates.m2m.sw.SWTransformer
 import templates.utils.AmltCacheModel
 
 class Amlt2InchronTransformer extends Model2ModelRootTransformer {
-
-	/*- Factory initiaization */
-	val inchronRootFactory = RootFactory.eINSTANCE
-
-	val inchronModelFactory = ModelFactory.eINSTANCE
-
-	@Inject extension HWTransformer hwTransformer
-
-	@Inject extension OSTransformer osTransformer
-
-	@Inject extension MappingTransformer mappingTransformer
-
-	@Inject extension StimuliTransformer stimuliTransformer
-
-	@Inject extension SWTransformer swTransformer
+	
+	@Inject ModelTransformer modelTransformer	
 
 	override m2mTransformation(ResourceSet inputResourceSet, ResourceSet outputResourceSet) {
 		/*- Associating CacheModel to the transformation. 
@@ -99,7 +74,7 @@
 	/**
 	 * This method is used to transform AMALTHEA model to INCHRON model
 	 */
-	def create inchronRootFactory.createRoot transform(Amalthea amalthea) {
+	def create RootFactory.eINSTANCE.createRoot transform(Amalthea amalthea) {
 
 		/*-Step 1: Injecting all the required transformation objects into the CustomObjsStore. Advantage with this approach is, it provides flexibility to access these elements across various transformers */
 //	 	customObjsStore.injectMembers(SWTransformer , swTransformer)
@@ -108,63 +83,8 @@
 //
 //	 	customObjsStore.injectMembers(StimuliTransformer , stimuliTransformer)
 		/* Step 2: Building INCHRON model by invoking various transformers */
-		model = createInchronModel(amalthea)
+		model = modelTransformer.createInchronModel(amalthea)
 
 	}
 
-	/**
-	 * This method creates the object of INCHRON Model element, and fills it by invoking various transformations
-	 */
-	def create inchronModelFactory.createModel createInchronModel(Amalthea amalthea) {
-
-//		setRequiredAttributes(amalthea, it)
-		transformMetaInfo(amalthea, it)
-
-		it.name = "Model"
-
-		(customObjsStore.getInstance(AmltCacheModel) as AmltCacheModel).setAmaltheaModel(amalthea)
-		(customObjsStore.getInstance(AmltCacheModel) as AmltCacheModel).inchronModel = it
-
-		hwTransformer.transfromHWModel(amalthea.hwModel, it)
-
-		osTransformer.transfromOSModel(amalthea.osModel, it)
-
-		mappingTransformer.transfromMappingModel(amalthea.mappingModel, it)
-
-		stimuliTransformer.transformStimuliModel(amalthea.stimuliModel, it)
-
-		swTransformer.transformSWModel(amalthea.swModel, it)
-	}
-
-	/**
-	 * Create and fill the INCHRON model's GeneralInfo with meta information,
-	 * mainly from the Amalthea customProperties map.
-	 * @Note: customProperties keys used here are currently informal/not specified. 
-	 */
-	def transformMetaInfo(Amalthea amalthea, Model inchronModel) {
-
-		var DateFormat dateFormat = new SimpleDateFormat("dd.MMMM.yyyy", Locale.ENGLISH)
-
-		var info = inchronModelFactory.createGeneralInfo()
-		info.setCreator(("Amlt2Inchron " + amalthea.getVersion() + " " + new Date()).toString())
-		info.setVersion("1")
-
-		val value = amalthea.getCustomProperties().get("Date_Last_Modified")
-		if (value instanceof StringObject) {
-			val date = (value as StringObject).getValue()
-			if (date !== null)
-				info.setModifiedDate(dateFormat.parse(date))
-		}
-
-		val author = amalthea.getCustomProperties().get("Author")
-		if (author instanceof StringObject)
-			info.setAuthor((author as StringObject).getValue())
-
-		val descr = amalthea.getCustomProperties().get("Description")
-		if (descr instanceof StringObject)
-			info.setDescription((descr as StringObject).getValue())
-
-		inchronModel.setGeneralInfo(info)
-	}
-	
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/FrequencyDomainTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/FrequencyDomainTransformer.xtend
index 223a525..6cc2f0d 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/FrequencyDomainTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/FrequencyDomainTransformer.xtend
@@ -16,15 +16,16 @@
 package templates.m2m.hw
 
 import com.inchron.realtime.root.model.TimeUnit
-import javax.inject.Inject
 import org.eclipse.app4mc.amalthea.model.FrequencyDomain
 import templates.AbstractAmaltheaInchronTransformer
 import templates.m2m.utils.FrequencyTransformer
+import com.google.inject.Inject
+import com.google.inject.Singleton
 
-
+@Singleton
 class FrequencyDomainTransformer extends AbstractAmaltheaInchronTransformer {
 
-	@Inject FrequencyTransformer frequencyTransformer
+	@Inject FrequencyTransformer frequencyTransformer	
 
 	def create inchronModelFactory.createClock createClock(FrequencyDomain amltFrequencyDomain) {
 		
@@ -55,6 +56,5 @@
 		it.startValue = inchronModelFactory.createTime
 
 	}
-
-
+	
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_ECUTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_ECUTransformer.xtend
index 9e88a15..79cf0f0 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_ECUTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_ECUTransformer.xtend
@@ -16,13 +16,16 @@
 package templates.m2m.hw
 
 import com.google.inject.Inject
+
 import com.inchron.realtime.root.model.Model
 import org.eclipse.app4mc.amalthea.model.Cache
 import org.eclipse.app4mc.amalthea.model.HwStructure
 import org.eclipse.app4mc.amalthea.model.Memory
 import org.eclipse.app4mc.amalthea.model.StructureType
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class HWStructure_ECUTransformer extends AbstractAmaltheaInchronTransformer {
 
 	@Inject HWStructure_MicroControllerTransformer microControllerTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_MicroControllerTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_MicroControllerTransformer.xtend
index 245f39e..a224a35 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_MicroControllerTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_MicroControllerTransformer.xtend
@@ -21,7 +21,9 @@
 import org.eclipse.app4mc.amalthea.model.Memory
 import org.eclipse.app4mc.amalthea.model.ProcessingUnit
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class HWStructure_MicroControllerTransformer extends AbstractAmaltheaInchronTransformer {
 
 	@Inject MemoryTransformer memoryTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_SystemTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_SystemTransformer.xtend
index 21efa57..cef1cbc 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_SystemTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWStructure_SystemTransformer.xtend
@@ -22,7 +22,9 @@
 import org.eclipse.app4mc.amalthea.model.Memory
 import org.eclipse.app4mc.amalthea.model.StructureType
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class HWStructure_SystemTransformer extends AbstractAmaltheaInchronTransformer {
 
 	@Inject HWStructure_ECUTransformer ecuTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWTransformer.xtend
index 5c7fdbb..2539c77 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/HWTransformer.xtend
@@ -20,7 +20,9 @@
 import org.eclipse.app4mc.amalthea.model.FrequencyDomain
 import org.eclipse.app4mc.amalthea.model.HWModel
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class HWTransformer extends AbstractAmaltheaInchronTransformer {
 
 	@Inject HWStructure_SystemTransformer hwStructure_SystemTransformer
@@ -29,8 +31,6 @@
 
 	def transfromHWModel(HWModel amltHWModel, Model inchronModel) {
 
-		this.inchronModel = inchronModel
-
 		amltHWModel.domains.forEach [ domain |
 			if (domain instanceof FrequencyDomain) {
 				var inchronClock = frequencyDomainTransformer.createClock(domain as FrequencyDomain)
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/MemoryTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/MemoryTransformer.xtend
index de1eb88..f3155ab 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/MemoryTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/MemoryTransformer.xtend
@@ -20,7 +20,9 @@
 import org.eclipse.app4mc.amalthea.model.Memory
 import templates.AbstractAmaltheaInchronTransformer
 import com.google.inject.Inject
+import com.google.inject.Singleton
 
+@Singleton
 class MemoryTransformer extends AbstractAmaltheaInchronTransformer {
 
 	@Inject FrequencyDomainTransformer frequencyDomainTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/ProcessingUnitTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/ProcessingUnitTransformer.xtend
index 4dfd7aa..8f3228c 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/ProcessingUnitTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/hw/ProcessingUnitTransformer.xtend
@@ -17,7 +17,9 @@
 
 import org.eclipse.app4mc.amalthea.model.ProcessingUnit
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ProcessingUnitTransformer extends AbstractAmaltheaInchronTransformer {
 
 	def create inchronModelFactory.createCpuCore createCpuCore(ProcessingUnit amltProcessingUnit) {
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/mapping/MappingTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/mapping/MappingTransformer.xtend
index 0410ff9..d469894 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/mapping/MappingTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/mapping/MappingTransformer.xtend
@@ -24,7 +24,9 @@
 import templates.m2m.hw.ProcessingUnitTransformer
 import com.google.inject.Inject
 import templates.m2m.os.OSTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class MappingTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
@@ -33,8 +35,6 @@
 
 	def transfromMappingModel(MappingModel amltMappingModel, Model inchronModel) {
 
-		this.inchronModel = inchronModel
-
 		cacheModel = customObjsStore.getInstance(AmltCacheModel)
 
 		// building cache
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/os/OSTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/os/OSTransformer.xtend
index 2097e2c..1069c3d 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/os/OSTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/os/OSTransformer.xtend
@@ -19,7 +19,9 @@
 import org.eclipse.app4mc.amalthea.model.OSModel
 import templates.AbstractAmaltheaInchronTransformer
 import org.eclipse.app4mc.amalthea.model.OperatingSystem
+import com.google.inject.Singleton
 
+@Singleton
 class OSTransformer extends AbstractAmaltheaInchronTransformer {
 		
 
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/stimuli/StimuliTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/stimuli/StimuliTransformer.xtend
index ab59edd..6dff2d9 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/stimuli/StimuliTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/stimuli/StimuliTransformer.xtend
@@ -22,10 +22,12 @@
 import org.eclipse.app4mc.amalthea.model.StimuliModel
 import org.eclipse.app4mc.amalthea.model.Stimulus
 import templates.AbstractAmaltheaInchronTransformer
-import templates.m2m.hw.FrequencyDomainTransformer
 import templates.m2m.utils.TimeTransformer
 import templates.utils.AmltCacheModel
+import com.google.inject.Singleton
+import templates.m2m.hw.FrequencyDomainTransformer
 
+@Singleton
 class StimuliTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
@@ -88,11 +90,9 @@
 
 			it.targets = inchronCallGraph
 
-			//cacheModel.addAmltStimuli_inchronActivationConnection(amltStimulus.name, inchronActivationConnection)
-
 			// TODO: check if the right frequency can be fetched (below solution is good at present. In long run clarify this topic in detail)
-			var firstFrequencyDomain = cacheModel.geAmaltheaModel.hwModel.domains.findFirst [ domain | domain instanceof FrequencyDomain]
-			if (firstFrequencyDomain === null){
+			var firstFrequencyDomain = getAmaltheaRoot().hwModel.domains.findFirst [ domain | domain instanceof FrequencyDomain]
+			if (firstFrequencyDomain !== null){
 				it.clock =  frequencyDomainTransformer.createClock(firstFrequencyDomain as FrequencyDomain)
 				it.variation = inchronModelFactory.createTimeDistribution
 				it.minInterArrivalTime = inchronModelFactory.createTime
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CallGraphTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CallGraphTransformer.xtend
index f1eaa80..c190de4 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CallGraphTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CallGraphTransformer.xtend
@@ -1,3 +1,18 @@
+/**
+ ********************************************************************************
+ * Copyright (c) 2018-2019 Robert Bosch GmbH.
+ * 
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     Robert Bosch GmbH - initial API and implementation
+ ********************************************************************************
+ */
+
 package templates.m2m.sw
 
 import com.google.inject.Inject
@@ -5,7 +20,9 @@
 import org.eclipse.app4mc.amalthea.model.CallGraph
 import org.eclipse.app4mc.amalthea.model.Process
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class CallGraphTransformer extends AbstractAmaltheaInchronTransformer{
 	
 	@Inject GraphEntryBaseTransformer graphEntryBaseTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CustomEventTriggerTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CustomEventTriggerTransformer.xtend
index 58d2ca7..72c9e06 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CustomEventTriggerTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/CustomEventTriggerTransformer.xtend
@@ -1,3 +1,18 @@
+/**
+ ********************************************************************************
+ * Copyright (c) 2018-2019 Robert Bosch GmbH.
+ * 
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     Robert Bosch GmbH - initial API and implementation
+ ********************************************************************************
+ */
+
 package templates.m2m.sw
 
 import com.google.inject.Inject
@@ -11,8 +26,10 @@
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmaltheaModelNagivationUtils
 import templates.utils.AmltCacheModel
+import com.google.inject.Singleton
 
-class CustomEventTriggerTransformer  extends AbstractAmaltheaInchronTransformer {
+@Singleton
+class CustomEventTriggerTransformer extends AbstractAmaltheaInchronTransformer {
 	
 	var AmltCacheModel cacheModel
 	
@@ -79,7 +96,7 @@
 						
 						if(inchronConditon.eContainer===null){
 							//Adding ModeCondition to the Inchron Model
-							cacheModel.inchronModel.globalModeConditions.add(inchronConditon)
+							getInchronRoot().globalModeConditions.add(inchronConditon)
 						}
 					}
 					
@@ -113,7 +130,7 @@
 					
 			it.name = "EventStimulus_"+amltCustomEventBackReference.name
 							
-							 		cacheModel.inchronModel.connections.add(it)
+							 		getInchronRoot().connections.add(it)
 							 		
 							 		amltTasks.forEach[amltStimulatedTask|{
 								 		var inchronActivateProcess = inchronModelFactory.createActivateProcess
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/GraphEntryBaseTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/GraphEntryBaseTransformer.xtend
index 17eaa8a..c64cea0 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/GraphEntryBaseTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/GraphEntryBaseTransformer.xtend
@@ -28,7 +28,9 @@
 import org.eclipse.app4mc.amalthea.model.TaskRunnableCall
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmltCacheModel
+import com.google.inject.Singleton
 
+@Singleton
 class GraphEntryBaseTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
@@ -102,7 +104,8 @@
 					"_Connection"
 				inchronActivationItem.connection = inchronActivationConnection
 		
-				cacheModel.inchronModel.connections.add(inchronActivationConnection)
+				
+				getInchronRoot().connections.add(inchronActivationConnection)
 		
 				(amltCallSequenceItem.stimulus as InterProcessStimulus).affectedProcesses.forEach [ amltRefProcess |
 					{
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ISRTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ISRTransformer.xtend
index 6fe3363..c265da4 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ISRTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ISRTransformer.xtend
@@ -19,7 +19,9 @@
 import org.eclipse.app4mc.amalthea.model.ISR
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmltCacheModel
+import com.google.inject.Singleton
 
+@Singleton
 class ISRTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeLabelTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeLabelTransformer.xtend
index bcc9619..83b3895 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeLabelTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeLabelTransformer.xtend
@@ -1,3 +1,18 @@
+/**
+ ********************************************************************************
+ * Copyright (c) 2018-2019 Robert Bosch GmbH.
+ * 
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     Robert Bosch GmbH - initial API and implementation
+ ********************************************************************************
+ */
+
 package templates.m2m.sw
 
 import com.inchron.realtime.root.model.ModeGroup
@@ -6,7 +21,9 @@
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmltCacheModel
 import com.inchron.realtime.root.model.Mode
+import com.google.inject.Singleton
 
+@Singleton
 class ModeLabelTransformer  extends AbstractAmaltheaInchronTransformer {
 	
 	var AmltCacheModel cacheModel
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeSwitchTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeSwitchTransformer.xtend
index 090c6e8..80a8c02 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeSwitchTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeSwitchTransformer.xtend
@@ -23,7 +23,9 @@
 import org.eclipse.app4mc.amalthea.model.RunnableModeSwitch
 import templates.utils.AmltCacheModel
 import com.inchron.realtime.root.model.FunctionCall
+import com.google.inject.Singleton
 
+@Singleton
 class ModeSwitchTransformer extends GraphEntryBaseTransformer { 
 	
 	@Inject RunnableItemTransformer runnableItemTransformer
@@ -84,7 +86,7 @@
 						
 						if(inchronConditon.eContainer===null){
 							//Adding ModeCondition to the Inchron Model
-							cacheModel.inchronModel.globalModeConditions.add(inchronConditon)
+							getInchronRoot().globalModeConditions.add(inchronConditon)
 						}
 					}
 					
@@ -150,7 +152,7 @@
 						
 						if(inchronConditon.eContainer===null){
 							//Adding ModeCondition to the Inchron Model
-							cacheModel.inchronModel.globalModeConditions.add(inchronConditon)
+							getInchronRoot().globalModeConditions.add(inchronConditon)
 						}
 					}
 
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeValueDisjunctionTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeValueDisjunctionTransformer.xtend
index b4ef1ac..6ca919b 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeValueDisjunctionTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/ModeValueDisjunctionTransformer.xtend
@@ -1,3 +1,18 @@
+/**
+ ********************************************************************************
+ * Copyright (c) 2018-2019 Robert Bosch GmbH.
+ * 
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     Robert Bosch GmbH - initial API and implementation
+ ********************************************************************************
+ */
+
 package templates.m2m.sw;
 
 import com.inchron.realtime.root.model.Mode
@@ -9,58 +24,59 @@
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmltCacheModel
 import com.google.inject.Inject
+import com.google.inject.Singleton
 
+@Singleton
 public class ModeValueDisjunctionTransformer extends AbstractAmaltheaInchronTransformer {
 
 var AmltCacheModel cacheModel
 
 @Inject ModeLabelTransformer modeLabelTransformer 
 
-public def create inchronModelFactory.createModeCondition createModeCondition(ModeValueDisjunction amltModeValueDisjunction,Process amltTask ){
+	public def create inchronModelFactory.createModeCondition createModeCondition(ModeValueDisjunction amltModeValueDisjunction,Process amltTask ){		
+		cacheModel = customObjsStore.getInstance(AmltCacheModel)
+		
+		it.name="ModeCondition_"+amltTask.name+"_"+it.hashCode
 			
-			cacheModel = customObjsStore.getInstance(AmltCacheModel)
+		amltModeValueDisjunction?.entries?.forEach[amltModeValueDisjunctionEntry|{
 			
-			it.name="ModeCondition_"+amltTask.name+"_"+it.hashCode
-				
-			amltModeValueDisjunction?.entries?.forEach[amltModeValueDisjunctionEntry|{
-				
-				val inchronModeConjunction=inchronModelFactory.createModeConjunction
-				//Adding ModeConjunction
-				it.conjunctions.add(inchronModeConjunction)
-				
-				if(amltModeValueDisjunctionEntry instanceof ModeValue){
-					val amltModeLiteral=amltModeValueDisjunctionEntry.value
-					var amltModeLabel=amltModeValueDisjunctionEntry.valueProvider
+			val inchronModeConjunction=inchronModelFactory.createModeConjunction
+			//Adding ModeConjunction
+			it.conjunctions.add(inchronModeConjunction)
+			
+			if(amltModeValueDisjunctionEntry instanceof ModeValue){
+				val amltModeLiteral=amltModeValueDisjunctionEntry.value
+				var amltModeLabel=amltModeValueDisjunctionEntry.valueProvider
+				//Adding Mode
+				inchronModeConjunction.modes.add(modeLabelTransformer.getInchronMode(amltModeLabel, amltModeLiteral))
+			} else if(amltModeValueDisjunctionEntry instanceof ModeValueConjunction){
+				amltModeValueDisjunctionEntry?.entries?.forEach[amltModeValueEntry|{
+					var amltModeLiteral=amltModeValueEntry.value
+					var amltModeLabel=amltModeValueEntry.valueProvider
 					//Adding Mode
 					inchronModeConjunction.modes.add(modeLabelTransformer.getInchronMode(amltModeLabel, amltModeLiteral))
-				} else if(amltModeValueDisjunctionEntry instanceof ModeValueConjunction){
-					amltModeValueDisjunctionEntry?.entries?.forEach[amltModeValueEntry|{
-						var amltModeLiteral=amltModeValueEntry.value
-						var amltModeLabel=amltModeValueEntry.valueProvider
-						//Adding Mode
-						inchronModeConjunction.modes.add(modeLabelTransformer.getInchronMode(amltModeLabel, amltModeLiteral))
-					}]
-				}
-			}]
-		}
+				}]
+			}
+		}]
+	}
 		
 		
 		
-		public def Mode  getInchronMode(ModeLiteral amltModeLiteral ){
-			
-			val amltModeName=amltModeLiteral?.containingMode?.name
-			
-			val inchronModeGroup=cacheModel.getInchronModeGroup(amltModeName)
+	public def Mode  getInchronMode(ModeLiteral amltModeLiteral ){
 		
-				if(inchronModeGroup !==null){
-					val inchronMode= inchronModeGroup.modes.findFirst[inchronMode|{
-						(amltModeLiteral.name.equals(inchronMode.name)) 
-					}]
-					return inchronMode
-				}
-			
-			return null
-		 
-			
-		}
+		val amltModeName=amltModeLiteral?.containingMode?.name
+		
+		val inchronModeGroup=cacheModel.getInchronModeGroup(amltModeName)
+	
+			if(inchronModeGroup !==null){
+				val inchronMode= inchronModeGroup.modes.findFirst[inchronMode|{
+					(amltModeLiteral.name.equals(inchronMode.name)) 
+				}]
+				return inchronMode
+			}
+		
+		return null
+	 
+		
+	}
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableItemTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableItemTransformer.xtend
index 1169dc4..7c9f76b 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableItemTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableItemTransformer.xtend
@@ -1,3 +1,18 @@
+/**
+ ********************************************************************************
+ * Copyright (c) 2018-2019 Robert Bosch GmbH.
+ * 
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     Robert Bosch GmbH - initial API and implementation
+ ********************************************************************************
+ */
+
 package templates.m2m.sw
 
 import com.google.inject.Inject
@@ -12,7 +27,9 @@
 import org.eclipse.app4mc.amalthea.model.RunnableModeSwitch
 import java.util.List
 import org.eclipse.app4mc.amalthea.model.CustomEventTrigger
+import com.google.inject.Singleton
 
+@Singleton
 class RunnableItemTransformer extends AbstractAmaltheaInchronTransformer{
 	
 	@Inject RunnableCallTransformer runnableCallTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableTransformer.xtend
index eec49a6..655ddc6 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/RunnableTransformer.xtend
@@ -21,7 +21,9 @@
 import org.eclipse.app4mc.amalthea.model.Runnable
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmltCacheModel
+import com.google.inject.Singleton
 
+@Singleton
 class RunnableTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/SWTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/SWTransformer.xtend
index 296f3ef..7b40dc3 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/SWTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/SWTransformer.xtend
@@ -29,7 +29,9 @@
 import templates.m2m.hw.ProcessingUnitTransformer
 import templates.m2m.os.OSTransformer
 import templates.m2m.stimuli.StimuliTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class SWTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
@@ -46,8 +48,6 @@
 
 	def transformSWModel(SWModel amltSwModel, Model inchronModel) {
 
-		this.inchronModel = inchronModel
-
 		cacheModel = customObjsStore.getInstance(AmltCacheModel)
 	
 		val Map<Process, com.inchron.realtime.root.model.Process> amltProcess_inchronProcessMap = new HashMap
@@ -105,7 +105,7 @@
 			}
 		]
 
-		amltProcess_inchronProcessMap.forEach [ amltProcess, inchronProcess |
+		amltProcess_inchronProcessMap.forEach [ amltProcess, inchronProcess | {
 
 
  
@@ -115,27 +115,16 @@
 				
 			}
 			
-			
-			
-		 
-
-			amltProcess?.stimuli?.forEach [ amltStimuli |
-//				val inchronActivationConnection = cacheModel.amltStimuli_inchronActivationConnectionMap.get(
-//					amltStimuli.name)
+			amltProcess?.stimuli?.forEach [ amltStimuli |{
 				val inchronActivationConnection = stimuliTransformer.createActivationConnection(amltStimuli)
 					
-					
-					if(inchronActivationConnection!==null){
-									var inchronActivateProcess = inchronModelFactory.createActivateProcess
-					
-									inchronActivateProcess.target = amltProcess_inchronProcessMap.get(amltProcess)
-					
-									inchronActivationConnection?.activations?.add(inchronActivateProcess)
-					}
-	
-			]
-
-		]
+				if(inchronActivationConnection!==null){
+								var inchronActivateProcess = inchronModelFactory.createActivateProcess
+								inchronActivateProcess.target = amltProcess_inchronProcessMap.get(amltProcess)
+								inchronActivationConnection?.activations?.add(inchronActivateProcess)
+				}	
+			}]
+		}]
 	}
 
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/TaskTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/TaskTransformer.xtend
index 37e7706..cbae336 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/TaskTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/TaskTransformer.xtend
@@ -19,7 +19,9 @@
 import org.eclipse.app4mc.amalthea.model.Task
 import templates.AbstractAmaltheaInchronTransformer
 import templates.utils.AmltCacheModel
+import com.google.inject.Singleton
 
+@Singleton
 class TaskTransformer extends AbstractAmaltheaInchronTransformer {
 
 	var AmltCacheModel cacheModel
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/AsynchronousServerCallTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/AsynchronousServerCallTransformer.xtend
index 90db82c..f308356 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/AsynchronousServerCallTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/AsynchronousServerCallTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class AsynchronousServerCallTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelAccessTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelAccessTransformer.xtend
index 0eb387c..1b9f880 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelAccessTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelAccessTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ChannelAccessTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelReceiveTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelReceiveTransformer.xtend
index 7eea6a0..56349ee 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelReceiveTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelReceiveTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ChannelReceiveTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelSendTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelSendTransformer.xtend
index e3eedc8..8fbd1bc 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelSendTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ChannelSendTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ChannelSendTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ComputationItemTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ComputationItemTransformer.xtend
index 6e518fc..bb4a741 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ComputationItemTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ComputationItemTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ComputationItemTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/CustomEventTriggerTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/CustomEventTriggerTransformer.xtend
index f109156..469fe3b 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/CustomEventTriggerTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/CustomEventTriggerTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class CustomEventTriggerTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ExecutionNeedTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ExecutionNeedTransformer.xtend
index 342ddc0..805a2f7 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ExecutionNeedTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ExecutionNeedTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ExecutionNeedTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GetResultServerCallTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GetResultServerCallTransformer.xtend
index f92294b..0c3b8c4 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GetResultServerCallTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GetResultServerCallTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class GetResultServerCallTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GroupTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GroupTransformer.xtend
index beaee50..ac01338 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GroupTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/GroupTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class GroupTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/LabelAccessTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/LabelAccessTransformer.xtend
index 2984e14..a1b6449 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/LabelAccessTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/LabelAccessTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class LabelAccessTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ModeLabelAccessTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ModeLabelAccessTransformer.xtend
index f494f5e..aa3de83 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ModeLabelAccessTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ModeLabelAccessTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ModeLabelAccessTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableCallTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableCallTransformer.xtend
index c1a128a..1219c97 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableCallTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableCallTransformer.xtend
@@ -21,7 +21,9 @@
 import org.eclipse.app4mc.amalthea.model.RunnableCall
 import templates.AbstractAmaltheaInchronTransformer
 import templates.m2m.sw.RunnableTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class RunnableCallTransformer extends AbstractAmaltheaInchronTransformer {
 
 	@Inject RunnableTransformer runnableTransformer
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableModeSwitchTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableModeSwitchTransformer.xtend
index 1441980..399baaf 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableModeSwitchTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableModeSwitchTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class RunnableModeSwitchTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableProbablilitySwitchTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableProbablilitySwitchTransformer.xtend
index cf94662..676989e 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableProbablilitySwitchTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/RunnableProbablilitySwitchTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class RunnableProbablilitySwitchTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SemaphoreAccessTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SemaphoreAccessTransformer.xtend
index 1b86afd..6346869 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SemaphoreAccessTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SemaphoreAccessTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class SemaphoreAccessTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverCommunicationTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverCommunicationTransformer.xtend
index b736062..6ae7549 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverCommunicationTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverCommunicationTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class SenderReceiverCommunicationTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverReadTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverReadTransformer.xtend
index ef0d67e..134174e 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverReadTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverReadTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class SenderReceiverReadTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverWriteTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverWriteTransformer.xtend
index dbec4cc..a13ab88 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverWriteTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SenderReceiverWriteTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class SenderReceiverWriteTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ServerCallTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ServerCallTransformer.xtend
index 6c332e6..86dd130 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ServerCallTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/ServerCallTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class ServerCallTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SynchronousServerCallTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SynchronousServerCallTransformer.xtend
index 61d380c..3b74950 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SynchronousServerCallTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/SynchronousServerCallTransformer.xtend
@@ -16,6 +16,8 @@
 package templates.m2m.sw.runnableItem
 
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class SynchronousServerCallTransformer extends AbstractAmaltheaInchronTransformer {
 }
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/TicksTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/TicksTransformer.xtend
index 6a14aa4..30c1f05 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/TicksTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/sw/runnableItem/TicksTransformer.xtend
@@ -29,7 +29,9 @@
 import org.eclipse.emf.ecore.util.EcoreUtil
 import templates.AbstractAmaltheaInchronTransformer
 import templates.m2m.utils.TimeTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class TicksTransformer extends AbstractAmaltheaInchronTransformer {
 
 	def create inchronModelFactory.createResourceConsumption createResourceConsumption(Process amltTask,
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/FrequencyTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/FrequencyTransformer.xtend
index ff2218e..4bf1d23 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/FrequencyTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/FrequencyTransformer.xtend
@@ -18,7 +18,9 @@
 import com.inchron.realtime.root.model.FrequencyUnit
 import org.eclipse.app4mc.amalthea.model.Frequency
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class FrequencyTransformer extends AbstractAmaltheaInchronTransformer {
 
 	def create inchronModelFactory.createFrequency createFrequency(Frequency amltFrequency) {
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/TimeTransformer.xtend b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/TimeTransformer.xtend
index ff26a56..5b9f867 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/TimeTransformer.xtend
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/m2m/utils/TimeTransformer.xtend
@@ -17,7 +17,9 @@
 
 import org.eclipse.app4mc.amalthea.model.Time
 import templates.AbstractAmaltheaInchronTransformer
+import com.google.inject.Singleton
 
+@Singleton
 class TimeTransformer extends AbstractAmaltheaInchronTransformer {
 
 	def create inchronModelFactory.createTime createTime(Time amltTime) {
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmaltheaModelNagivationUtils.java b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmaltheaModelNagivationUtils.java
index 0ee0523..d422ddf 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmaltheaModelNagivationUtils.java
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmaltheaModelNagivationUtils.java
@@ -1,3 +1,18 @@
+/**
+ ********************************************************************************
+ * Copyright (c) 2018-2019 Robert Bosch GmbH.
+ * 
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ *     Robert Bosch GmbH - initial API and implementation
+ ********************************************************************************
+ */
+
 package templates.utils;
 
 import java.util.ArrayList;
diff --git a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmltCacheModel.java b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmltCacheModel.java
index 5e09a06..9679781 100644
--- a/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmltCacheModel.java
+++ b/eclipse-tools/model-transformation/examples/amlt2inchron/org.eclipse.app4mc.transform.to.inchron.m2m/src/templates/utils/AmltCacheModel.java
@@ -20,7 +20,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.eclipse.app4mc.amalthea.model.Amalthea;
 import org.eclipse.app4mc.amalthea.model.InterruptController;
 import org.eclipse.app4mc.amalthea.model.MappingModel;
 import org.eclipse.app4mc.amalthea.model.OperatingSystem;
@@ -34,7 +33,6 @@
 
 import com.inchron.realtime.root.model.Component;
 import com.inchron.realtime.root.model.ModeGroup;
-import com.inchron.realtime.root.model.Model;
 
 public class AmltCacheModel {
 
@@ -44,11 +42,7 @@
 	private Map<Process, Component> amltProcess_InchronComponentMap = new HashMap<>();
 	
 	private Map<Process, com.inchron.realtime.root.model.Process> amltProcess_inchronProcessMap = new HashMap<>();
-
-	private Model inchronModel;
-
-	private Amalthea amaltheaModel;
-
+	
 	private Map<com.inchron.realtime.root.model.Scheduler, Scheduler> inchronScheduler_amltSchedulerMap = new HashMap<>();
 
 	private Map<Scheduler, SchedulerAllocation> scheduler_schedulerAllocationMap = new HashMap<Scheduler, SchedulerAllocation>();
@@ -239,21 +233,5 @@
 	public Component getInchronComponent(Process amltProcess) {
 		return amltProcess_InchronComponentMap.get(amltProcess);
 	}
-	
-	public Model getInchronModel() {
-		return inchronModel;
-	}
-
-	public void setInchronModel(Model inchronModel) {
-		this.inchronModel = inchronModel;
-	}
-	
-	public Amalthea geAmaltheaModel() {
-		return amaltheaModel;
-	}
-
-	public void setAmaltheaModel(Amalthea _amaltheaModel) {
-		this.amaltheaModel = _amaltheaModel;
-	}
 
 }
diff --git a/eclipse-tools/model-transformation/examples/sample-model-transformation/app4mc.example.transform.m2m/src/module/DefaultM2MInjectorModule.java b/eclipse-tools/model-transformation/examples/sample-model-transformation/app4mc.example.transform.m2m/src/module/DefaultM2MInjectorModule.java
index 2ef206c..f735c6b 100644
--- a/eclipse-tools/model-transformation/examples/sample-model-transformation/app4mc.example.transform.m2m/src/module/DefaultM2MInjectorModule.java
+++ b/eclipse-tools/model-transformation/examples/sample-model-transformation/app4mc.example.transform.m2m/src/module/DefaultM2MInjectorModule.java
@@ -30,7 +30,7 @@
 
 	@Override
 	protected void initializeTransformerObjects() {
-		// TODO Auto-generated method stub
+		// add custom transformer binding in this method
 		
 	}
 
diff --git a/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.application/src/org/eclipse/app4mc/transformation/application/base/ExecuteTransformation.xtend b/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.application/src/org/eclipse/app4mc/transformation/application/base/ExecuteTransformation.xtend
index bd41b6c..e6ab5d7 100644
--- a/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.application/src/org/eclipse/app4mc/transformation/application/base/ExecuteTransformation.xtend
+++ b/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.application/src/org/eclipse/app4mc/transformation/application/base/ExecuteTransformation.xtend
@@ -25,6 +25,7 @@
 import org.eclipse.app4mc.transformation.extensions.CustomObjectsStore
 import org.eclipse.app4mc.transformation.extensions.base.templates.Model2ModelRootTransformer
 import org.eclipse.app4mc.transformation.extensions.base.templates.Model2TextRootTransformer
+import org.eclipse.app4mc.transformation.extensions.base.templates.AbstractTransformer
 
 class ExecuteTransformation {
 
@@ -57,17 +58,17 @@
 			/*- M2M transformation */
 			var m2mConfig = transformationConfig.model2ModelConfig;
 
-			if (m2mConfig != null && model2ModelTransformer !== null) {
+			if (m2mConfig !== null && model2ModelTransformer !== null) {
 
 				m2mConfig.properties = properties
 
 				m2mConfig.logger = logger
 				
-				model2ModelTransformer.logger=logger
+				Model2ModelRootTransformer.logger=logger
 
-				model2ModelTransformer.properties=properties				
+				Model2ModelRootTransformer.properties=properties				
 								
-				model2ModelTransformer.injector=injector
+				Model2ModelRootTransformer.injector=injector
 
 				model2ModelTransformer.m2mTransformation(m2mConfig.inputResourceSet, m2mConfig.ouputResourceSet)
 			}
@@ -77,17 +78,17 @@
 
 			var m2tConfig = transformationConfig.model2TextConfig;
 
-			if (m2tConfig != null && model2TextTransformer !== null) {
+			if (m2tConfig !== null && model2TextTransformer !== null) {
 
 				m2tConfig.properties = properties
 				
 				m2tConfig.logger = logger
 				
-				model2TextTransformer.logger=logger
+				Model2TextRootTransformer.logger=logger
 				
-				model2ModelTransformer.properties=properties
+				Model2TextRootTransformer.properties=properties
 
-				model2TextTransformer.injector=injector
+				Model2TextRootTransformer.injector=injector
 
 				model2TextTransformer.m2tTransformation(m2tConfig.inputResourceSet)
 			}
diff --git a/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.extensions/src/org/eclipse/app4mc/transformation/extensions/base/templates/AbstractTransformer.xtend b/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.extensions/src/org/eclipse/app4mc/transformation/extensions/base/templates/AbstractTransformer.xtend
index 8b27bc1..e414204 100644
--- a/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.extensions/src/org/eclipse/app4mc/transformation/extensions/base/templates/AbstractTransformer.xtend
+++ b/eclipse-tools/model-transformation/plugins/org.eclipse.app4mc.transformation.extensions/src/org/eclipse/app4mc/transformation/extensions/base/templates/AbstractTransformer.xtend
@@ -15,7 +15,6 @@
 
 package org.eclipse.app4mc.transformation.extensions.base.templates
 
-import com.google.inject.Inject
 import java.util.Properties
 import org.apache.log4j.LogManager
 import org.apache.log4j.Logger
@@ -26,13 +25,13 @@
 
 public abstract class AbstractTransformer{
 	
-	@Inject public CustomObjectsStore customObjsStore
+	static public CustomObjectsStore customObjsStore = new CustomObjectsStore
 
-	public Logger logger
+	static public Logger logger
 
-	public Properties properties
+    static public Properties properties
 	
-	public Injector injector
+	static public Injector injector
 
 	/**
 	 * Provides Log4J logger which can be used by the corresponding Transformer classes.