Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-09-15 09:19:15 -0400
committerHenrik Rentz-Reichert2011-09-15 09:19:15 -0400
commit2ad92cc067b066c0ed25ae3ef392001e55d3c3a4 (patch)
tree708588cb573f817cf8dff445338c1c71f1faf8e5
parentfde485e48614d11adf60ba927654b939d6c20984 (diff)
downloadorg.eclipse.etrice-2ad92cc067b066c0ed25ae3ef392001e55d3c3a4.tar.gz
org.eclipse.etrice-2ad92cc067b066c0ed25ae3ef392001e55d3c3a4.tar.xz
org.eclipse.etrice-2ad92cc067b066c0ed25ae3ef392001e55d3c3a4.zip
[generator.java] removed old Xpand generator
-rw-r--r--plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF15
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/extensions/Extensions.ext84
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java1
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ActorClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/DataClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/Diagnostician.java (renamed from plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Diagnostician.java)2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java (renamed from plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/GeneratorModule.java)2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/Logger.java (renamed from plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Logger.java)2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/StandaloneSetup.java (renamed from plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/StandaloneSetup.java)2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt149
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt73
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt47
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt28
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/ProcedureHelpers.xpt56
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/ProtocolClass.xpt238
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/StateMachine.xpt242
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemClass.xpt122
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemRunner.xpt71
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator.mwe262
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator_CPP.mwe262
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java2
28 files changed, 18 insertions, 1260 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
index 55ebe07f8..680c141b8 100644
--- a/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
@@ -5,23 +5,14 @@ Bundle-Vendor: eTrice (Incubation)
Bundle-Version: 0.1.0.qualifier
Bundle-SymbolicName: org.eclipse.etrice.generator.java;singleton:=true
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.etrice.core.room;bundle-version="0.1.0";visibility:=reexport,
- org.eclipse.etrice.core.room.ui;bundle-version="0.1.0",
+Require-Bundle: org.eclipse.etrice.core.room.ui;bundle-version="0.1.0",
org.eclipse.etrice.generator;bundle-version="0.1.0",
- org.eclipse.xpand;bundle-version="1.0.1";visibility:=reexport,
- org.eclipse.xtend;bundle-version="1.0.1";visibility:=reexport,
- org.eclipse.xtext;bundle-version="2.0.0";visibility:=reexport,
org.eclipse.emf.mwe2.launch;bundle-version="1.0.1";resolution:=optional,
- org.eclipse.emf.mwe.utils;bundle-version="1.0.0";visibility:=reexport,
- org.eclipse.xtend.typesystem.emf;bundle-version="1.0.1";visibility:=reexport,
- org.eclipse.xtend.util.stdlib;bundle-version="1.0.1",
- org.eclipse.jdt.core;bundle-version="3.6.0",
org.eclipse.core.resources;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.jface;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.xtext.xbase.lib;bundle-version="2.0.0",
- org.eclipse.xtext.xtend2.lib;bundle-version="2.0.0"
+ org.eclipse.xtext.xtend2.lib;bundle-version="2.0.0",
+ org.eclipse.xtend;bundle-version="1.1.0"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/org.eclipse.etrice.generator.java/src/extensions/Extensions.ext b/plugins/org.eclipse.etrice.generator.java/src/extensions/Extensions.ext
deleted file mode 100644
index e3cd5a23e..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/extensions/Extensions.ext
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-/*
- collection of convenience functions for code generation
-*/
-
-import room;
-import etricegen;
-
-extension org::eclipse::etrice::generator::extensions::Extensions;
-extension org::eclipse::xtend::util::stdlib::naming;
-
-///////////////////////////////////////////////////////////////////////////////
-// general
-
-///////////////////////////////////////////////////////////////////////////////
-// types
-
-// type names for Type class (distinguish Primitive and DataClass)
-String toJavaType(PrimitiveType prim):
-switch(prim.toString()) {
- case 'uint8': 'undefined_type'
- case 'uint16': 'undefined_type'
- case 'uint32': 'undefined_type'
- case 'int8': 'byte'
- case 'int16': 'short'
- case 'int32': 'int'
- case 'float32': 'float'
- case 'float64': 'double'
- case 'string' : 'String'
- default: prim.toString()};
-String toJavaObjectType(PrimitiveType prim):
-switch(prim.toString()) {
- case 'uint8': 'undefined_type'
- case 'uint16': 'undefined_type'
- case 'uint32': 'undefined_type'
- case 'int8': 'Byte'
- case 'int16': 'Short'
- case 'int32': 'Integer'
- case 'float32': 'Float'
- case 'float64': 'Double'
- case 'string': 'String'
- default: prim.toString()};
-String typeName(Type type): type.type!=null? type.type.name : type.prim.toJavaType();
-String freeTypeName(FreeType type): type.type!=null? type.type : type.prim.toJavaType();
-String typeObjectName(Type type): type.type!=null? type.type.name : type.prim.toJavaObjectType();
-
-// default values for data
-String defaultValue(PrimitiveType prim):
-switch(prim.toString()) {
- case 'uint8': '0'
- case 'uint16': '0'
- case 'uint32': '0'
- case 'int8': '0'
- case 'int16': '0'
- case 'int32': '0'
- case 'float32': '0.0'
- case 'float64': '0.0'
- case 'string': '""'
- default: prim.toString()};
-String defaultValue(TypedID a): a.type.type!=null? "new "+a.type.type.name+"()" : a.type.prim.defaultValue();
-
-///////////////////////////////////////////////////////////////////////////////
-// protocol and messages
-
-///////////////////////////////////////////////////////////////////////////////
-// actor
-
-private String getDataTypeCast(TriggeredTransition tt): tt.triggers.msgFromIfPairs.message.select(e|e.data!=null).first().data.type.typeObjectName();
-private String getDataType(TriggeredTransition tt): tt.triggers.msgFromIfPairs.message.select(e|e.data!=null).first().data.type.typeName();
-String getArgumentList(ExpandedActorClass xpac, Transition t): JAVA org.eclipse.etrice.generator.java.gen.JavaGenerator.getArgumentList(org.eclipse.etrice.generator.etricegen.ExpandedActorClass, org.eclipse.etrice.core.room.Transition);
-String getTypedDataDefinition(Message m): JAVA org.eclipse.etrice.generator.java.gen.JavaGenerator.getTypedData(org.eclipse.etrice.core.room.Message);
-
-String getExecuteChainCode(ExpandedActorClass ac, TransitionChain tc): JAVA org.eclipse.etrice.generator.java.gen.JavaGenerator.getExecuteChain(org.eclipse.etrice.generator.etricegen.ExpandedActorClass, org.eclipse.etrice.generator.etricegen.TransitionChain);
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
index 90c595af9..65a29a664 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
@@ -27,6 +27,7 @@ import org.eclipse.etrice.generator.builder.GeneratorModelBuilder;
import org.eclipse.etrice.generator.builder.ILogger;
import org.eclipse.etrice.generator.etricegen.IDiagnostician;
import org.eclipse.etrice.generator.etricegen.Root;
+import org.eclipse.etrice.generator.java.setup.StandaloneSetup;
import org.eclipse.xtext.generator.IGenerator;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.eclipse.xtext.util.CancelIndicator;
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ActorClassGen.xtend
index af961833c..f111a913d 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ActorClassGen.xtend
@@ -21,7 +21,7 @@ import static extension org.eclipse.xtext.xtend2.lib.*
import org.eclipse.etrice.core.room.*
import org.eclipse.etrice.generator.etricegen.*
-import org.eclipse.etrice.generator.java.Logger
+import org.eclipse.etrice.generator.java.setup.Logger
class ActorClassGen {
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/DataClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/DataClassGen.xtend
index 0686120f6..6f391f87d 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/DataClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/DataClassGen.xtend
@@ -21,7 +21,7 @@ import static extension org.eclipse.xtext.xtend2.lib.*
import org.eclipse.etrice.core.room.*
import org.eclipse.etrice.generator.etricegen.*
-import org.eclipse.etrice.generator.java.Logger
+import org.eclipse.etrice.generator.java.setup.Logger
class DataClassGen {
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.xtend
index 761fb8360..2f87d8476 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.xtend
@@ -24,7 +24,7 @@ import org.eclipse.emf.ecore.*
import org.eclipse.etrice.core.room.*
import org.eclipse.etrice.generator.etricegen.*
-import org.eclipse.etrice.generator.java.Logger
+import org.eclipse.etrice.generator.java.setup.Logger
class PrepareFileSystem {
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
index 27afe3558..2d0ec7a5f 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
@@ -21,7 +21,7 @@ import static extension org.eclipse.xtext.xtend2.lib.*
import org.eclipse.etrice.core.room.*
import org.eclipse.etrice.generator.etricegen.*
-import org.eclipse.etrice.generator.java.Logger
+import org.eclipse.etrice.generator.java.setup.Logger
class ProtocolClassGen {
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 0e5d92c07..45957b2f9 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
@@ -21,7 +21,7 @@ import static extension org.eclipse.xtext.xtend2.lib.*
import org.eclipse.etrice.core.room.*
import org.eclipse.etrice.generator.etricegen.*
-import org.eclipse.etrice.generator.java.Logger
+import org.eclipse.etrice.generator.java.setup.Logger
class SubSystemClassGen {
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Diagnostician.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/Diagnostician.java
index 42647d50c..70292bd01 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Diagnostician.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/Diagnostician.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.generator.java;
+package org.eclipse.etrice.generator.java.setup;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/GeneratorModule.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java
index 0139f0e32..82a5133c2 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/GeneratorModule.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/GeneratorModule.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.generator.java;
+package org.eclipse.etrice.generator.java.setup;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Logger.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/Logger.java
index 37a4ab4ad..76a034436 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Logger.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/Logger.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.generator.java;
+package org.eclipse.etrice.generator.java.setup;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.etrice.generator.builder.ILogger;
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/StandaloneSetup.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/StandaloneSetup.java
index 885b6ff0b..4bc96d39a 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/StandaloneSetup.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/setup/StandaloneSetup.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.generator.java;
+package org.eclipse.etrice.generator.java.setup;
import org.eclipse.xtext.ISetup;
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt
deleted file mode 100644
index f34a7537b..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt
+++ /dev/null
@@ -1,149 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-
-«DEFINE actorClass FOR Root»
-
-«FOREACH this.xpActorClasses AS xpac»
-«LET xpac.actorClass AS ac»
-
-«("generating "+getPath(ac)+ac.name+".java").info()»
-
-«FILE getPath(ac)+ac.name+".java"»
-package «getPackage(ac)»;
-
-import org.eclipse.etrice.runtime.java.messaging.Address;
-import org.eclipse.etrice.runtime.java.messaging.IRTObject;
-import org.eclipse.etrice.runtime.java.messaging.IMessageReceiver;
-import org.eclipse.etrice.runtime.java.modelbase.ActorClassBase;
-import org.eclipse.etrice.runtime.java.modelbase.SubSystemClassBase;
-import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
-import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
-
-«LET this.getReferencedModels(ac) AS models»
-«FOREACH models AS model»import «model.name».*;
-«ENDFOREACH»
-«ENDLET»
-
-«LET this.getReferencedProtocols(ac) AS protocols»
-«FOREACH protocols AS pc»import «getPackage(pc)».«pc.name».*;
-«ENDFOREACH»
-«ENDLET»
-
-«EXPAND ProcedureHelpers::UserCode FOR ac.userCode1»
-
-
-public «IF ac.abstract»abstract «ENDIF»class «ac.name» extends «IF ac.base!=null»«ac.base.name»«ELSE»ActorClassBase«ENDIF» {
-
- «EXPAND ProcedureHelpers::UserCode FOR ac.userCode2»
-
- //--------------------- ports
- «FOREACH ac.getEndPorts() AS ep»protected «ep.getPortClassName()» «ep.name» = null;
- «ENDFOREACH»
- //--------------------- saps
- «FOREACH ac.strSAPs AS sap»protected «sap.getPortClassName()» «sap.name» = null;
- «ENDFOREACH»
- //--------------------- services
- «FOREACH ac.serviceImplementations AS svc»protected «svc.getPortClassName()» «svc.spp.name» = null;
- «ENDFOREACH»
-
- //--------------------- interface item IDs
- «FOREACH ac.getEndPorts() AS ep»protected static final int IFITEM_«ep.name» = «xpac.getInterfaceItemLocalId(ep)+1»;
- «ENDFOREACH»
- «FOREACH ac.strSAPs AS sap»protected static final int IFITEM_«sap.name» = «xpac.getInterfaceItemLocalId(sap)+1»;
- «ENDFOREACH»
- «FOREACH ac.serviceImplementations AS svc»protected static final int IFITEM_«svc.spp.name» = «xpac.getInterfaceItemLocalId(svc.spp)+1»;
- «ENDFOREACH»
-
- «EXPAND ProcedureHelpers::Attributes FOR ac.attributes»
- «EXPAND ProcedureHelpers::Operations FOR ac.operations»
-
- //--------------------- construction
- public «ac.name»(IRTObject parent, String name, Address[][] port_addr, Address[][] peer_addr){
- «IF ac.base==null»
- super(parent, name, port_addr[0][0], peer_addr[0][0]);
- «ELSE»
- super(parent, name, port_addr, peer_addr);
- «ENDIF»
- setClassName("«ac.name»");
-
- // initialize attributes
- «FOREACH ac.attributes AS a-»
- «IF a.defaultValueLiteral!=null-»
- «a.name» = «a.defaultValueLiteral»;
- «ELSEIF a.type.type!=null-»
- «a.name» = new «a.type.type.name»();
- «ENDIF-»
- «ENDFOREACH-»
-
- // own ports«FOREACH ac.getEndPorts() AS ep»
- «ep.name» = new «ep.getPortClassName()»(this, "«ep.name»", IFITEM_«ep.name», «IF ep.multiplicity==1»0, «ENDIF»port_addr[IFITEM_«ep.name»]«IF ep.multiplicity==1»[0]«ENDIF», peer_addr[IFITEM_«ep.name»]«IF ep.multiplicity==1»[0]«ENDIF»);
- «ENDFOREACH»
- // own saps«FOREACH ac.strSAPs AS sap»
- «sap.name» = new «sap.getPortClassName()»(this, "«sap.name»", IFITEM_«sap.name», 0, port_addr[IFITEM_«sap.name»][0], peer_addr[IFITEM_«sap.name»][0]);
- «ENDFOREACH»
- // own service implementations«FOREACH ac.serviceImplementations AS svc»
- «svc.spp.name» = new «svc.getPortClassName()»(this, "«svc.spp.name»", IFITEM_«svc.spp.name», port_addr[IFITEM_«svc.spp.name»], peer_addr[IFITEM_«svc.spp.name»]);
- «ENDFOREACH»
- }
-
-
- //--------------------- lifecycle functions
- public void init(){
- initUser();
- }
-
- public void start(){
- startUser();
- }
-
- «IF !ac.overridesStop()»
- public void stop(){
- stopUser();
- }
- «ENDIF»
-
- public void destroy(){
- destroyUser();
- }
-
- «IF ac.stateMachine != null»
- «EXPAND StateMachine::stateMachine FOR xpac»
- «ELSEIF !xpac.hasStateMachine()»
- //--------------------- no state machine
- @Override
- public void receiveEvent(InterfaceItemBase ifitem, int evt, Object data) {
- handleSystemEvent(ifitem, evt, data);
- }
-
- @Override
- public void executeInitTransition(){
- }
-
- «ENDIF»
-};
-«ENDFILE»
-«ENDLET»
-«ENDFOREACH»
-«ENDDEFINE»
-
-«DEFINE msgArgs FOR Message»
-«IF this.data!=null»«this.data.defaultValue()»«ENDIF»
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt
deleted file mode 100644
index f03ca2157..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/DataClass.xpt
+++ /dev/null
@@ -1,73 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE dataClass FOR Root»
-
-«FOREACH this.usedDataClasses AS dc»
-
-«("generating "+getPath(dc)+dc.name+".java").info()»
-
-«FILE getPath(dc)+dc.name+".java"»
-package «getPackage(dc)»;
-
-«LET this.getReferencedModels(dc) AS models»
-«FOREACH models AS model»import «model.name».*;
-«ENDFOREACH»
-«ENDLET»
-
-«IF dc.imports.size>0»
-// user imports
-«FOREACH dc.imports AS imp»import «imp.importedNamespace».*;
-«ENDFOREACH»«ENDIF»
-
-public class «dc.name»«IF dc.base!=null» extends «dc.base.name»«ENDIF» {
- «EXPAND ProcedureHelpers::Attributes FOR dc.attributes»
- «EXPAND ProcedureHelpers::AttributeSettersGetters FOR dc.attributes»
- «EXPAND ProcedureHelpers::Operations FOR dc.operations»
-
- // default constructor
- public «dc.name»() {
- «FOREACH dc.attributes AS a-»
- «IF a.defaultValueLiteral!=null-»
- «IF a.size==0»«a.name» = «a.defaultValueLiteral»;«ENDIF»
- «ELSEIF a.type.type!=null-»
- «a.name» = new «a.type.type.name»();
- «ENDIF-»
- «ENDFOREACH-»
- }
-
- // deep copy
- public «dc.name» deepCopy() {
- «dc.name» copy = new «dc.name»();
- «FOREACH dc.attributes AS a-»
- «IF a.type.type!=null-»
- copy.«a.name» = «a.name».deepCopy();
- «ELSE-»
- «IF a.size==0»copy.«a.name» = «a.name»;«ELSE»for (int i=0;i<«a.size»;i++){copy.«a.name»[i]=«a.name»[i];}«ENDIF»
- «ENDIF-»
- «ENDFOREACH-»
- return copy;
- }
-};
-«ENDFILE»
-«ENDFOREACH»
-«ENDDEFINE»
-
-
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt
deleted file mode 100644
index 95ae9415c..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/DocGraphviz.xpt
+++ /dev/null
@@ -1,47 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz
- *
- *******************************************************************************/
-«ENDREM»
-
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE docGraphviz FOR Root»
-
-«FOREACH this.subSystemInstances AS comp»
-
-«LET comp.subSystemClass AS ssc»
-
-«("generating "+getPath(ssc)+ssc.name+".dot").info()»
-«FILE getPath(ssc)+ssc.name+".dot"»
-digraph «ssc.name» {
- rankdir=LR;
- node [shape=box];
- «comp.path.getPathName()» [label="«comp.name»\n(«ssc.name»)" style=filled color=yellow];
- «EXPAND instance FOREACH comp.instances-»
-}
-«ENDFILE»
-«ENDLET»
-«ENDFOREACH»
-«ENDDEFINE»
-
-«DEFINE instance FOR ActorInstance»
- «LET (StructureInstance)this.eContainer AS parent»
- «this.path.getPathName()» [label="«this.name»\n(«this.actorClass.name»)"];
- «parent.path.getPathName()» -> «this.path.getPathName()»;
- «ENDLET»
- «EXPAND instance FOREACH this.instances-»
-«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt
deleted file mode 100644
index 93b5464f9..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/Main.xpt
+++ /dev/null
@@ -1,28 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE main FOR Root-»
-«IF this.library»«("generating model library (all ROOM classes)").info()»«ENDIF»
- «EXPAND DataClass::dataClass FOR this»
- «EXPAND ProtocolClass::protocolClass FOR this»
- «EXPAND ActorClass::actorClass FOR this»
- «EXPAND SubSystemClass::subSystemClass FOR this»
- «EXPAND SubSystemRunner::subSystemRunner FOR this»
-
- «EXPAND DocGraphviz::docGraphviz FOR this»
-
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/ProcedureHelpers.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/ProcedureHelpers.xpt
deleted file mode 100644
index 092e37de9..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/ProcedureHelpers.xpt
+++ /dev/null
@@ -1,56 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-
-«EXTENSION extensions::Extensions»
-
-«DEFINE ActorClassPortIF FOR ActorClass»
- «IF this.extPorts.size > 0»implements«ENDIF»
- «FOREACH this.extPorts AS ep»public «ep.ifport.protocol.name»«IF ep.ifport.conjugated==true»Conj«ENDIF»Port «ep.ifport.name» = null;
- «ENDFOREACH»
-
-«ENDDEFINE»
-
-«DEFINE UserCode FOR DetailCode »
- «IF this!=null»
- //--------------------- begin user code
- «FOREACH this.commands AS command» «command»
- «ENDFOREACH»//--------------------- end user code
- «ENDIF»
-«ENDDEFINE»
-
-«DEFINE Attributes FOR List[Attribute] »
- //--------------------- attributes
- «FOREACH this AS attribute»«IF attribute.size==0»protected «IF attribute.type.ext != null»«attribute.type.ext»«ELSE»«attribute.type.typeName()»«ENDIF» «attribute.name»;«ELSE»protected «attribute.type.typeName()»[] «attribute.name»«IF attribute.defaultValueLiteral==null» =new «attribute.type.typeName()»[«attribute.size»];«ELSE» = «attribute.defaultValueLiteral»;«ENDIF»
- «ENDIF»
- «ENDFOREACH»
-«ENDDEFINE»
-
-«DEFINE AttributeSettersGetters FOR List[Attribute] »
- //--------------------- attribute setters and getters
- «FOREACH this AS attribute»public void set«attribute.name.toFirstUpper()» («IF attribute.type.ext != null» «attribute.type.ext»«ELSE»«attribute.type.typeName()»«ENDIF»«IF attribute.size!=0»[]«ENDIF» «attribute.name») {
- this.«attribute.name» = «attribute.name»;
- }
- public «IF attribute.type.ext != null» «attribute.type.ext»«ELSE»«attribute.type.typeName()»«ENDIF»«IF attribute.size!=0»[]«ENDIF» get«attribute.name.toFirstUpper()» () {
- return «attribute.name»;
- }«ENDFOREACH»
-«ENDDEFINE»
-
-«DEFINE Operations FOR List[Operation] »
- //--------------------- operations
- «FOREACH this AS operation»public «IF operation.returntype==null»void«ELSE»«operation.returntype.freeTypeName()»«ENDIF» «operation.name» («FOREACH operation.arguments AS argument SEPARATOR ", "»«argument.type.freeTypeName()» «argument.name»«ENDFOREACH»){
- «FOREACH operation.detailCode.commands AS command» «command»
- «ENDFOREACH»
- }«ENDFOREACH»
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/ProtocolClass.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/ProtocolClass.xpt
deleted file mode 100644
index e396a7704..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/ProtocolClass.xpt
+++ /dev/null
@@ -1,238 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE protocolClass FOR Root»
-
-«FOREACH this.usedProtocolClasses AS pc»
-
-«("generating "+getPath(pc)+pc.name+".java").info()»
-
-«FILE getPath(pc)+pc.name+".java"»
-package «getPackage(pc)»;
-
-import java.util.ArrayList;
-
-import org.eclipse.etrice.runtime.java.messaging.Address;
-import org.eclipse.etrice.runtime.java.messaging.Message;
-import org.eclipse.etrice.runtime.java.modelbase.*;
-import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
-
-«REM»
-«FOREACH pc.getAllIncomingMessages() AS message»
-«IF message.data.type.ext != null»
-«FOREACH message.data.type.ext.imports AS imp»import «imp.importedNamespace».*; «ENDFOREACH»
-«ENDIF»
-«ENDFOREACH»
-«ENDREM»
-
-«EXPAND ProcedureHelpers::UserCode FOR pc.userCode1»
-
-«LET this.getReferencedModels(pc) AS models»
-«FOREACH models AS model»import «model.name».*;
-«ENDFOREACH»
-«ENDLET»
-
-public class «pc.name» {
- // message IDs
- // TODO: separate class for message IDs: class MSG{public static volatile int MSG_MIN = 0; ...} -> better structure
- // error if msgID <= MSG_MIN
- public static final int MSG_MIN = 0;
- //IDs for outgoing messages
- «FOREACH pc.getAllOutgoingMessages() AS message ITERATOR iter»public static final int OUT_«message.name» = «iter.counter1»;
- «ENDFOREACH»
- //IDs for incoming messages
- «FOREACH pc.getAllIncomingMessages() AS message ITERATOR iter»public static final int IN_«message.name» = «iter.counter1+pc.getAllOutgoingMessages().size»;
- «ENDFOREACH»
- //error if msgID >= MSG_MAX
- public static final int MSG_MAX = «pc.getAllOutgoingMessages().size + pc.getAllIncomingMessages().size+1»;
-
- «EXPAND ProcedureHelpers::UserCode FOR pc.userCode2»
-
- private static String messageStrings[] = {"MIN", «FOREACH pc.getAllOutgoingMessages() AS m»"«m.name»",«ENDFOREACH» «FOREACH pc.getAllIncomingMessages() AS m»"«m.name»",«ENDFOREACH»"MAX"};
-
- public String getMessageString(int msg_id) {
- if (msg_id<0 || msg_id>MSG_MAX+1){
- // id out of range
- return "Message ID out of range";
- }
- else{
- return messageStrings[msg_id];
- }
- }
-
- «EXPAND portClass(false) FOR pc»
- «EXPAND portClass(true) FOR pc»
-}
-«ENDFILE»
-«ENDFOREACH»
-«ENDDEFINE»
-
-«DEFINE portClass(Boolean conj) FOR ProtocolClass»
-
-«LET getPortClassName(this, conj) AS name»
-«LET this.getPortClass(conj) AS pclass»
-
-// port class
-static public class «name» extends PortBase {
- «IF pclass!=null»«EXPAND ProcedureHelpers::UserCode FOR pclass.userCode-»
- «ENDIF-»
- // constructors
- public «name»(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) {
- super(actor, name, localId, 0, addr, peerAddress);
- DebuggingService.getInstance().addPortInstance(this);
- }
- public «name»(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {
- super(actor, name, localId, idx, addr, peerAddress);
- DebuggingService.getInstance().addPortInstance(this);
- }
-
- @Override
- public void receive(Message m) {
- if (!(m instanceof EventMessage))
- return;
- EventMessage msg = (EventMessage) m;
- if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX)
- System.out.println("unknown");
- else {
- if (messageStrings[msg.getEvtId()] != "timerTick"){
- // TODOTS: model switch for activation
- DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
- }
- «IF this.handlesReceive(conj)»
- switch (msg.getEvtId()) {
- «FOREACH this.getReceiveHandlers(conj) AS hdlr»
- case «hdlr.msg.getCodeName()»:
- {
- «FOREACH hdlr.detailCode.commands AS command» «command»
- «ENDFOREACH»
- }
- break;
- «ENDFOREACH»
- default:
- «ENDIF»
- if (msg instanceof EventWithDataMessage)
- getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
- else
- getActor().receiveEvent(this, msg.getEvtId(), null);
- «IF this.handlesReceive(conj)»
- }«ENDIF»
- }
- }
-
- «EXPAND ProcedureHelpers::Attributes FOR pclass.attributes-»
- «EXPAND ProcedureHelpers::Operations FOR pclass.operations-»
-
- // sent messages
- «FOREACH this.getOutgoing(conj) AS m»«EXPAND sendMessage(conj) FOR m»«ENDFOREACH-»
-}
-
-// replicated port class
-static public class «name»Repl {
- private ArrayList<«name»> ports;
- private int replication;
-
- public «name»Repl(IEventReceiver actor, String name, int localId, Address[] addr,
- Address[] peerAddress) {
- replication = addr.length;
- ports = new ArrayList<«this.name».«name»>(replication);
- for (int i=0; i<replication; ++i) {
- ports.add(new «name»(
- actor, name+i, localId, i, addr[i], peerAddress[i]));
- }
- }
-
- public int getReplication() {
- return replication;
- }
-
- public int getIndexOf(InterfaceItemBase ifitem){
- return ifitem.getIdx();
- }
-
- public «name» get(int i) {
- return ports.get(i);
- }
-
- «IF conj»
- // incoming messages
- «FOREACH this.getAllIncomingMessages() AS m-»
- «EXPAND messageSignature FOR m»{
- for (int i=0; i<replication; ++i) {
- ports.get(i).«EXPAND messageCall FOR m»;
- }
- }
- «ENDFOREACH-»
- «ELSE-»
- // outgoing messages
- «FOREACH this.getAllOutgoingMessages() AS m-»
- «EXPAND messageSignature FOR m»{
- for (int i=0; i<replication; ++i) {
- ports.get(i).«EXPAND messageCall FOR m»;
- }
- }
- «ENDFOREACH-»
- «ENDIF-»
-}
-
-// interface for port class
-public interface I«name»{
- «IF conj-»
- // outgoing messages
- «FOREACH this.getAllOutgoingMessages() AS m» «EXPAND messageSignature FOR m»;
- «ENDFOREACH-»
- «ELSE-»
- // incoming messages
- «FOREACH this.getAllIncomingMessages() AS m» «EXPAND messageSignature FOR m»;
- «ENDFOREACH-»
- «ENDIF-»
-}
-
-«ENDLET»
-«ENDLET»
-«ENDDEFINE»
-
-«REM»
-«DEFINE messageSignature FOR Message»public void «this.name» («IF this.data!=null»«this.data.type.typeName()» «this.data.name»«ENDIF»)«ENDDEFINE»
-«DEFINE messageSignature FOR Message»public void «this.name» («IF this.data!=null»«IF this.data.type.ext==null»«this.data.type.typeName()»«ELSE»«this.data.type.ext.name»«ENDIF» «this.data.name»«ENDIF»)«ENDDEFINE»
-«ENDREM»
-
-«DEFINE messageSignature FOR Message»public void «this.name» («IF this.data!=null»«this.data.type.typeName()» «this.data.name»«ENDIF»)«ENDDEFINE»
-«DEFINE messageCall FOR Message»«this.name»(«IF this.data!=null» «this.data.name»«ENDIF»)«ENDDEFINE»
-«DEFINE sendMessage(boolean conj) FOR Message-»
-«LET conj?"IN":"OUT" AS dir-»
-«LET this.getSendHandler(conj) AS hdlr-»
- «EXPAND messageSignature FOR this»{
- «IF hdlr!=null-»
- «FOREACH hdlr.detailCode.commands AS command» «command»
- «ENDFOREACH-»
- «ELSE-»
- if (messageStrings[ «dir»_«this.name»] != "timerTick"){
- // TODOTS: model switch for activation
- DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[«dir»_«this.name»]);
- }
- if (getPeerAddress()!=null)
- «IF this.data==null»getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), «dir»_«this.name»));
- «ELSE»getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), «dir»_«this.name», «this.data.name»«IF (!this.data.type.ref && this.data.type.type!=null)».deepCopy()«ENDIF»));
- «ENDIF-»
- «ENDIF-»
- }
-«ENDLET-»
-«ENDLET-»
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/StateMachine.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/StateMachine.xpt
deleted file mode 100644
index 552e34952..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/StateMachine.xpt
+++ /dev/null
@@ -1,242 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-
-«DEFINE stateMachine FOR ExpandedActorClass»
-«LET this.actorClass AS ac»
-//******************************************
-// START of generated code for FSM
-//******************************************
-
-// State IDs for FSM
-«LET ac.getNumberOfInheritedBaseStates() AS offset»
-«FOREACH ac.stateMachine.getBaseStateList() AS state ITERATOR iter»protected static final int «state.getStateId()» = «iter.counter1+1+offset»;
-«ENDFOREACH»«ENDLET»
-protected static final String stateStrings[] = {"<no state>","<top>",«FOREACH ac.getAllBaseStates() AS state ITERATOR iter SEPARATOR ","»"«state.getStatePathName()»"
-«ENDFOREACH»};
-
-// history
-// TODOHRR: history defined in ActorClassBase, init in constructor
-// history = new int[5];
-// for (int i = 0; i < history.length; i++) {
-// history[i] = NO_STATE;
-// }
-protected int history[] = {NO_STATE,NO_STATE«FOREACH ac.getAllBaseStates() AS state»,NO_STATE«ENDFOREACH»};
-
-«LET this.getOwnTransitionChains() AS chains»
-«LET this.getTransitionChains().size-chains.size AS offset»
-// transition chains
-«FOREACH chains AS tc ITERATOR i»protected static final int «tc.getChainId()» = «i.counter1+offset»;
-«ENDFOREACH»«ENDLET»«ENDLET»
-
-«LET this.getOwnTriggers() AS triggers»
-// triggers for FSM
-«FOREACH triggers AS mif»protected static final int «this.getTriggerCodeName(mif)» = IFITEM_«mif.from.name» + EVT_SHIFT*«this.getMessageID(mif)»;
-«ENDFOREACH»«ENDLET»
-
-// receiveEvent contains the main implementation of the FSM
-@Override
-public void receiveEvent(InterfaceItemBase ifitem, int evt, Object generic_data) {
- int trigger = ifitem.getLocalId() + EVT_SHIFT*evt;
- int chain = NOT_CAUGHT;
- int catching_state = NO_STATE;
- boolean is_handler = false;
- boolean skip_entry = false;
-
- if (!handleSystemEvent(ifitem, evt, generic_data)) {
- switch (state) {
- «FOREACH this.stateMachine.getLeafStateList() AS state-»
- case «state.getStateId()»:
- «LET this.getActiveTriggers(state) AS atlist-»
- «IF !atlist.isEmpty-»
- switch(trigger) {
- «FOREACH atlist AS at-»
- case «this.getTriggerCodeName(at.trigger)»:
- «LET this.hasGuard(at) AS needData-»
- «IF needData»{ «at.msg.getTypedDataDefinition()»«ENDIF-»
- «FOREACH at.transitions AS tt SEPARATOR " else "-»
- «LET this.getChain(tt) AS chain-»
- «EXPAND guard(at.trigger, this) FOR chain.transition-»
- {
- chain = «chain.getChainId()»;
- catching_state = «chain.getContextId()»;
- «IF chain.isHandler()»is_handler = true;«ENDIF-»
- «IF chain.skipEntry»skip_entry = true;«ENDIF-»
- }
- «ENDLET-»
- «ENDFOREACH-»
- «IF needData»}«ENDIF-»
- «ENDLET-»
- break;
- «ENDFOREACH-»
- }
- «ENDIF»«ENDLET-»
- break;
- «ENDFOREACH-»
- }
- }
- if (chain != NOT_CAUGHT) {
- exitTo(state, catching_state, is_handler);
- int next = executeTransitionChain(chain, ifitem, generic_data);
- next = enterHistory(next, is_handler, skip_entry);
- setState(next);
- }
-}
-
-private void setState(int new_state) {
- DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
- if (stateStrings[new_state]!="Idle") {
- // TODOTS: model switch for activation
- System.out.println(getInstancePath() + " -> " + stateStrings[new_state]);
- }
- this.state = new_state;
-}
-
-@Override
-public void executeInitTransition() {
- «LET this.stateMachine.getInitTransition() AS initt-»
- int chain = «this.getChain(initt).getChainId()»;
- int next = executeTransitionChain(chain, null, null);
- next = enterHistory(next, false, false);
- setState(next);
- «ENDLET-»
-}
-
-/**
- * calls exit codes while exiting from the current state to one of its
- * parent states while remembering the history
- * @param current - the current state
- * @param to - the final parent state
- * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
- */
-private void exitTo(int current, int to, boolean handler) {
- while (current!=to) {
- switch (current) {
- «FOREACH this.stateMachine.getBaseStateList() AS state-»
- case «state.getStateId()»:
- «IF state.hasExitCode()»if (!handler) «state.getExitCodeOperationName()»();«ENDIF-»
- history[«state.getParentStateId()»] = «state.getStateId()»;
- current = «state.getParentStateId()»;
- break;
- «ENDFOREACH-»
- }
- }
-}
-/**
- * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
- * matching the trigger of this chain. The ID of the final state is returned
- * @param chain - the chain ID
- * @param generic_data - the generic data pointer
- * @return the ID of the final state
- */
-private int executeTransitionChain(int chain, InterfaceItemBase ifitem, Object generic_data) {
- switch (chain) {
- «LET this.getTransitionChains() AS chains-»
- «FOREACH chains AS tc-»
- case «tc.getChainId()»:
- {
- «this.getExecuteChainCode(tc)-»
- }
- «ENDFOREACH»«ENDLET-»
- }
- return NO_STATE;
-}
-/**
- * calls entry codes while entering a state's history. The ID of the final leaf state is returned
- * @param state - the state which is entered
- * @param handler - entry code is executed if not handler
- * @return - the ID of the final leaf state
- */
-private int enterHistory(int state, boolean handler, boolean skip_entry) {
- while (true) {
- switch (state) {
- «FOREACH this.stateMachine.getBaseStateList() AS state-»
- case «state.getStateId()»:
- «IF state.hasEntryCode()»if (!(skip_entry || handler)) «state.getEntryCodeOperationName()»();«ENDIF»
- «IF state.isLeaf()-»
- // in leaf state: return state id
- return «state.getStateId()»;
- «ELSE-»
- // state has a sub graph
- «IF state.subgraph.hasInitTransition()-»
- // with init transition
- if (history[«state.getStateId()»]==NO_STATE) {
- «LET state.subgraph.getInitTransition() AS initt-»
- state = executeTransitionChain(«this.getChain(initt).getChainId()-», null, null);
- «ENDLET-»
- }
- else {
- state = history[«state.getStateId()»];
- }
- «ELSE-»
- // without init transition
- state = history[«state.getStateId()»];
- «ENDIF-»
- break;
- «ENDIF-»
- «ENDFOREACH-»
- case STATE_TOP:
- state = history[STATE_TOP];
- break;
- }
- skip_entry = false;
- }
- «REM»return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)«ENDREM»
-}
-
-//*** Entry and Exit Codes
-«FOREACH this.stateMachine.getStateList() AS state»
- «IF this.isOwnObject(state)»
- «IF state.hasEntryCode()»
- protected void «state.getEntryCodeOperationName()»() {
- «this.getEntryCode(state)»}
- «ENDIF»
- «IF state.hasExitCode()»
- protected void «state.getExitCodeOperationName()»() {
- «this.getExitCode(state)»}
- «ENDIF»
- «ENDIF»
-«ENDFOREACH»
-
-//*** Action Codes
-«FOREACH this.stateMachine.getTransitionList() AS tr»
- «IF this.isOwnObject(tr) && tr.hasActionCode()»
- protected void «tr.getActionCodeOperationName()»(«IF NonInitialTransition.isInstance(tr)»InterfaceItemBase ifitem«this.getArgumentList(tr)»«ENDIF») {
- «this.getActionCode(tr)»}
- «ENDIF»
-«ENDFOREACH»
-
-//******************************************
-// END of generated code for FSM
-//******************************************
-«ENDLET»
-«ENDDEFINE»
-
-«DEFINE guard(String trigger, ExpandedActorClass ac) FOR TriggeredTransition-»
- «LET this.triggers.selectFirst(e|ac.isMatching(e, trigger)) AS tr-»
- «IF tr.hasGuard()-»
- if («ac.getCode(tr.guard.guard)»)
- «ENDIF-»
- «ENDLET-»
-«ENDDEFINE»
-
-«DEFINE guard(String trigger, ExpandedActorClass ac) FOR Transition»
-/* error */
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemClass.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemClass.xpt
deleted file mode 100644
index dc0b9cd94..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemClass.xpt
+++ /dev/null
@@ -1,122 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE subSystemClass FOR Root»
-
-«FOREACH this.subSystemInstances AS comp»
-
-«LET comp.subSystemClass AS cc»
-
-«("generating "+getPath(cc)+cc.name+"_controller.java").info()»
-«FILE getPath(cc)+cc.name+".java"»
-package «getPackage(cc)»;
-
-import org.eclipse.etrice.runtime.java.messaging.MessageService;
-import org.eclipse.etrice.runtime.java.messaging.RTServices;
-import org.eclipse.etrice.runtime.java.messaging.Address;
-import org.eclipse.etrice.runtime.java.messaging.IRTObject;
-import org.eclipse.etrice.runtime.java.messaging.RTSystemServicesProtocol.*;
-import org.eclipse.etrice.runtime.java.modelbase.ActorClassBase;
-import org.eclipse.etrice.runtime.java.modelbase.SubSystemClassBase;
-import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
-
-«LET this.getReferencedModels(cc) AS models»
-«FOREACH models AS model»import «model.name».*;«ENDFOREACH»
-«ENDLET»
-
-
-«EXPAND ProcedureHelpers::UserCode FOR cc.userCode1»
-
-public class «comp.name» extends SubSystemClassBase{
-
- «EXPAND ProcedureHelpers::UserCode FOR cc.userCode2»
-
- public «comp.name»(IRTObject parent, String name) {
- super(parent, name);
- }
-
- @Override
- public void receiveEvent(InterfaceItemBase ifitem, int evt, Object data){
- }
-
- @Override
- public void instantiateMessageServices(){
-
- RTServices.getInstance().getMsgSvcCtrl().addMsgSvc(new MessageService(this, new Address(0, 0, 0),"MessageService_Main"));
- «FOREACH comp.subSystemClass.threads AS thread ITERATOR tid»
- RTServices.getInstance().getMsgSvcCtrl().addMsgSvc(new MessageService(this, new Address(0, «tid.counter1», 0),"MessageService_«thread.name»", «thread.prio»));
- «ENDFOREACH»
- }
-
- @Override
- public void instantiateActors(){
- // all addresses
- // Addresses for the Subsystem Systemport
- «FOREACH comp.allContainedInstances AS ai ITERATOR i»Address addr_item_SystemPort_«i.counter0»=new Address(0,0,«comp.objCounter.getAndIncrementCount()»);
- «ENDFOREACH»
-
- «FOREACH comp.allContainedInstances AS ai»
- // actor instance «ai.path» itself => Systemport Address
- // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport)
- Address addr_item_«ai.path.getPathName()»= new Address(0,«ai.threadId»,«ai.objId»);
- // interface items of «ai.path»«FOREACH ai.orderedIfItemInstances AS pi»
- «IF ServiceImplInstance.isInstance(pi) || pi.peers.size>1»«FOREACH pi.peers AS peer ITERATOR i»Address addr_item_«pi.path.getPathName()»_«i.counter0» = new Address(0,«pi.threadId»,«pi.objId+i.counter0»);
- «ENDFOREACH»
- «ELSE»Address addr_item_«pi.path.getPathName()» = new Address(0,«ai.threadId»,«pi.objId»);
- «ENDIF»
- «ENDFOREACH»
- «ENDFOREACH»
-
- // instantiate all actor instances
- instances = new ActorClassBase[«comp.allContainedInstances.size»];
- «FOREACH comp.allContainedInstances AS ai ITERATOR k»instances[«comp.allContainedInstances.indexOf(ai)»] = new «ai.actorClass.name»(
- «IF SubSystemInstance.isInstance(ai.eContainer)»this«ELSE»instances[«comp.allContainedInstances.indexOf(ai.eContainer)»]«ENDIF»,
- "«ai.name»",
- // own interface item addresses
- new Address[][] {{addr_item_«ai.path.getPathName()»},«FOREACH ai.orderedIfItemInstances AS pi SEPARATOR ","»{«IF ServiceImplInstance.isInstance(pi) || pi.peers.size>1»«FOREACH pi.peers AS peer ITERATOR i SEPARATOR ","»addr_item_«pi.path.getPathName()»_«i.counter0»«ENDFOREACH»
- «ELSE»addr_item_«pi.path.getPathName()»
- «ENDIF»}
- «ENDFOREACH»},
- // peer interface item addresses
- new Address[][] {{addr_item_SystemPort_«k.counter0»},«FOREACH ai.orderedIfItemInstances AS pi SEPARATOR ","»{«IF !ServiceImplInstance.isInstance(pi) && pi.peers.isEmpty»null«ELSE»«FOREACH pi.peers AS pp SEPARATOR ","»«IF ServiceImplInstance.isInstance(pp) || pp.peers.size>1»addr_item_«pp.path.getPathName()»_«pp.peers.indexOf(pi)»
- «ELSE»addr_item_«pp.path.getPathName()»
- «ENDIF»
- «ENDFOREACH»«ENDIF»}
- «ENDFOREACH»}
- );
- «ENDFOREACH»
-
- // create the subsystem system port
- RTSystemPort = new RTSystemServicesProtocolConjPortRepl(this, "RTSystemPort",
- 0, //local ID
- new Address[]{ // own addresses
- «FOREACH comp.allContainedInstances AS ai ITERATOR i SEPARATOR ","»addr_item_SystemPort_«i.counter0»
- «ENDFOREACH»},
- new Address[]{ // peer addresses
- «FOREACH comp.allContainedInstances AS ai SEPARATOR ","»addr_item_«ai.path.getPathName()»
- «ENDFOREACH»});
-
- }
-};
-«ENDFILE»
-
-«ENDLET»
-«ENDFOREACH»
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemRunner.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemRunner.xpt
deleted file mode 100644
index 6a511acfe..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/SubSystemRunner.xpt
+++ /dev/null
@@ -1,71 +0,0 @@
-«REM»
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-«ENDREM»
-«IMPORT room»;
-«IMPORT etricegen»;
-
-«EXTENSION org::eclipse::etrice::generator::extensions::Extensions»
-«EXTENSION extensions::Extensions»
-«EXTENSION org::eclipse::xtend::util::stdlib::io»
-
-«DEFINE subSystemRunner FOR Root»
-
-«FOREACH this.subSystemInstances AS ssc»
-
-«LET ssc.subSystemClass AS cc»
-
-«("generating "+getPath(cc)+cc.name+"Runner.java").info()»
-«FILE getPath(cc)+cc.name+"Runner.java"»
-
-/**
- * @author generated by eTrice
- *
- * this class contains the main function running component «ssc.name»
- * it instantiates «ssc.name» and starts and ends the lifecycle
- */
-
-package «getPackage(cc)»;
-
-import org.eclipse.etrice.runtime.java.modelbase.SubSystemRunnerBase;
-
-class «ssc.name+"Runner"» extends SubSystemRunnerBase {
-
- static «ssc.name» main_component = new «ssc.name»(null, "«ssc.name»");
-
- /**
- * main function
- * creates component and starts and stops the lifecycle
- */
- public static void main(String[] args) {
-
- System.out.println("*** T H E B E G I N ***");
-
- main_component.init(); // lifecycle init
- main_component.start(); // lifecycle start
-
- // application runs until quit
- waitForQuit();
-
- // end the lifecycle
- main_component.stop(); // lifecycle stop
- main_component.destroy(); // lifecycle destroy
-
- System.out.println("*** T H E E N D ***");
- }
-};
-
-«ENDFILE»
-
-«ENDLET»
-«ENDFOREACH»
-«ENDDEFINE»
diff --git a/plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator.mwe2 b/plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator.mwe2
deleted file mode 100644
index aa5718266..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator.mwe2
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-module workflow.RoomGenerator
-
-import org.eclipse.emf.mwe.utils.*
-
-var sourceDir = ""
-var targetDir = ""
-var fileEncoding = "Cp1252"
-
-Workflow {
-
- component = org.eclipse.xtext.mwe.Reader {
- // lookup all resources on the classpath
- // useJavaClassPath = true
-
- // or define search scope explicitly
- path = sourceDir
- useJavaClassPath=true
-
- // this class will be generated by the xtext generator
- register = org.eclipse.etrice.core.RoomStandaloneSetup {}
- load = {
- slot = "model"
-
- // HOWTO: feed top level object into generator
- // Sven Efftinge in news://news.eclipse.org:119/hlh0ju$if8$1@build.eclipse.org:
- // "The new reader is based on EObjectDescriptions, which are by default only available and created for elements, which have a name."
- // ==> Therefore we introduced a name for the model in Room.xtext
- type = "RoomModel"
- }
- }
-
- // HOWTO: call a custom workflow component
- component = org.eclipse.etrice.generator.workflow.GeneratorModelCreator {
- inSlot = "model"
- outSlot = "instance_model"
- debug = true // debug flag for verbose output
- save = true // save intermediate model for debugging purposes
- uri = "src-gen/tmp.rim" // name of intermediate model file
- }
-
- component = org.eclipse.xpand2.Generator {
- metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {}
- expand = "templates::Main::main FOREACH instance_model"
- outlet = {
- path = targetDir
- postprocessor = org.eclipse.xpand2.output.JavaBeautifier {}
- }
- fileEncoding = fileEncoding
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator_CPP.mwe2 b/plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator_CPP.mwe2
deleted file mode 100644
index 78f93ac17..000000000
--- a/plugins/org.eclipse.etrice.generator.java/src/workflow/RoomGenerator_CPP.mwe2
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-module workflow.RoomGenerator_CPP
-
-import org.eclipse.emf.mwe.utils.*
-
-var sourceDir = ""
-var targetDir = ""
-var fileEncoding = "Cp1252"
-
-Workflow {
-
- component = org.eclipse.xtext.mwe.Reader {
- // lookup all resources on the classpath
- // useJavaClassPath = true
-
- // or define search scope explicitly
- path = sourceDir
- useJavaClassPath=true
-
- // this class will be generated by the xtext generator
- register = org.eclipse.etrice.core.RoomStandaloneSetup {}
- load = {
- slot = "model"
-
- // HOWTO: feed top level object into generator
- // Sven Efftinge in news://news.eclipse.org:119/hlh0ju$if8$1@build.eclipse.org:
- // "The new reader is based on EObjectDescriptions, which are by default only available and created for elements, which have a name."
- // ==> Therefore we introduced a name for the model in Room.xtext
- type = "RoomModel"
- }
- }
-
- // HOWTO: call a custom workflow component
- component = org.eclipse.etrice.generator.workflow.GeneratorModelCreator {
- inSlot = "model"
- outSlot = "instance_model"
- debug = true // debug flag for verbose output
- save = true // save intermediate model for debugging purposes
- uri = "src-gen/tmp.rim" // name of intermediate model file
- }
-
- component = org.eclipse.xpand2.Generator {
- metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {}
- expand = "templates_CPP::Main::main FOREACH instance_model"
- outlet = {
- path = targetDir
- //postprocessor = org.eclipse.xpand2.output.JavaBeautifier {}
- }
- fileEncoding = fileEncoding
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java
index 676de5810..7517808d0 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java
@@ -20,10 +20,10 @@ import org.eclipse.etrice.core.room.Type;
import org.eclipse.etrice.core.room.TypedID;
import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
import org.eclipse.etrice.generator.etricegen.Root;
-import org.eclipse.etrice.generator.java.Logger;
import org.eclipse.etrice.generator.java.gen.ProcedureHelpers;
import org.eclipse.etrice.generator.java.gen.StateMachineGen;
import org.eclipse.etrice.generator.java.gen.StdExtensions;
+import org.eclipse.etrice.generator.java.setup.Logger;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.eclipse.xtext.xbase.lib.BooleanExtensions;
import org.eclipse.xtext.xbase.lib.IntegerExtensions;
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java
index 0cac77806..fcb6a6633 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java
@@ -9,9 +9,9 @@ import org.eclipse.etrice.core.room.Operation;
import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.core.room.Type;
import org.eclipse.etrice.generator.etricegen.Root;
-import org.eclipse.etrice.generator.java.Logger;
import org.eclipse.etrice.generator.java.gen.ProcedureHelpers;
import org.eclipse.etrice.generator.java.gen.StdExtensions;
+import org.eclipse.etrice.generator.java.setup.Logger;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.eclipse.xtext.xbase.lib.ComparableExtensions;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.java
index 929615aa2..6389cdcb7 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/PrepareFileSystem.java
@@ -9,8 +9,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.generator.etricegen.Root;
-import org.eclipse.etrice.generator.java.Logger;
import org.eclipse.etrice.generator.java.gen.StdExtensions;
+import org.eclipse.etrice.generator.java.setup.Logger;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.eclipse.xtext.xtend2.lib.StringConcatenation;
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
index 2c832a71d..1522a7daf 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
@@ -15,9 +15,9 @@ import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.etrice.core.room.Type;
import org.eclipse.etrice.core.room.TypedID;
import org.eclipse.etrice.generator.etricegen.Root;
-import org.eclipse.etrice.generator.java.Logger;
import org.eclipse.etrice.generator.java.gen.ProcedureHelpers;
import org.eclipse.etrice.generator.java.gen.StdExtensions;
+import org.eclipse.etrice.generator.java.setup.Logger;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.eclipse.xtext.xbase.lib.BooleanExtensions;
import org.eclipse.xtext.xbase.lib.IntegerExtensions;
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java
index 84e7f977f..30cae1ad1 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java
@@ -13,9 +13,9 @@ import org.eclipse.etrice.generator.etricegen.Counter;
import org.eclipse.etrice.generator.etricegen.InterfaceItemInstance;
import org.eclipse.etrice.generator.etricegen.Root;
import org.eclipse.etrice.generator.etricegen.SubSystemInstance;
-import org.eclipse.etrice.generator.java.Logger;
import org.eclipse.etrice.generator.java.gen.ProcedureHelpers;
import org.eclipse.etrice.generator.java.gen.StdExtensions;
+import org.eclipse.etrice.generator.java.setup.Logger;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.eclipse.xtext.xbase.lib.BooleanExtensions;
import org.eclipse.xtext.xbase.lib.ComparableExtensions;

Back to the top