Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Karlitschek2012-12-05 11:15:11 +0000
committerPeter Karlitschek2012-12-05 11:15:11 +0000
commit4d83ce0828b3f7a4e565433da28207e2c5478edc (patch)
tree31dafca74b0cc26d85a6ed52fe43dea80175768b
parent71f2c21f0b278fa2bdc39ce9ac5669c39a8e9200 (diff)
downloadorg.eclipse.etrice-4d83ce0828b3f7a4e565433da28207e2c5478edc.tar.gz
org.eclipse.etrice-4d83ce0828b3f7a4e565433da28207e2c5478edc.tar.xz
org.eclipse.etrice-4d83ce0828b3f7a4e565433da28207e2c5478edc.zip
rebase cppgenerator
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java105
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend170
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend7
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend35
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend51
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend22
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Validator.java49
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/setup/GeneratorModule.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.smap94
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java13
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/MainGen.smap22
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.smap47
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.smap167
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.smap31
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.cpp/src/org/eclipse/etrice/generator/launch/cpp/CppGeneratorLaunchConfigurationDelegate.java2
16 files changed, 329 insertions, 499 deletions
diff --git a/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF
index 67db5da71..6ae65af02 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.cpp/META-INF/MANIFEST.MF
@@ -14,7 +14,10 @@ Require-Bundle: org.eclipse.etrice.core.room.ui;bundle-version="0.1.0",
org.eclipse.xtext;bundle-version="2.1.1",
org.eclipse.xtend.lib,
com.google.guava,
- org.eclipse.xtext.xbase.lib
+ org.eclipse.xtext.xbase.lib,
+ org.eclipse.etrice.core.etmap,
+ org.eclipse.etrice.core.etphys,
+ org.eclipse.etrice.generator.config
Bundle-Version: 0.2.0.qualifier
Bundle-Vendor: eTrice (Incubation)
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java
index b541d5bcc..2e9ee7b46 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/Main.java
@@ -15,19 +15,28 @@ package org.eclipse.etrice.generator.cpp;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.etmap.eTMap.MappingModel;
+import org.eclipse.etrice.core.etmap.util.ETMapUtil;
+import org.eclipse.etrice.core.etphys.eTPhys.PhysicalModel;
+import org.eclipse.etrice.core.genmodel.etricegen.Root;
import org.eclipse.etrice.generator.base.AbstractGenerator;
+import org.eclipse.etrice.generator.base.IDataConfiguration;
+import org.eclipse.etrice.generator.base.IResourceURIAcceptor;
+import org.eclipse.etrice.generator.cpp.gen.Validator;
import org.eclipse.etrice.generator.cpp.setup.GeneratorModule;
import org.eclipse.xtext.generator.IGenerator;
-import org.eclipse.etrice.core.genmodel.etricegen.Root;
+import org.eclipse.xtext.scoping.impl.ImportUriResolver;
import com.google.inject.Inject;
public class Main extends AbstractGenerator {
public static final String OPTION_LIB = "-lib";
- public static final String OPTION_GEN_INST_DIAG = "-genInstDiag";
+ public static final String OPTION_NOEXIT = "-noexit";
+ public static final String OPTION_DOCUMENTATION = "-genDocu";
public static final String OPTION_SAVE_GEN_MODEL = "-saveGenModel";
+ public static final String OPTION_DEBUG = "-debug";
/**
* print usage message to stderr
@@ -37,8 +46,10 @@ public class Main extends AbstractGenerator {
output.println(" <list of model file paths> # model file paths may be specified as");
output.println(" # e.g. C:\\path\\to\\model\\mymodel.room");
output.println(" -saveGenModel <genmodel path> # if specified the generator model will be saved to this location");
- output.println(" -genInstDiag # if specified an instance diagram is created for each subsystem");
+ output.println(" -genDocu # if specified documentation is created");
output.println(" -lib # if specified all classes are generated and no instances");
+ output.println(" -noexit # if specified the JVM is not exited");
+ output.println(" -debug # if specified create debug output");
}
public static void main(String[] args) {
@@ -50,8 +61,17 @@ public class Main extends AbstractGenerator {
@Inject
private IGenerator mainGenerator;
-// @Inject
-// protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
+ @Inject
+ protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
+
+ @Inject
+ private Validator validator;
+
+ @Inject
+ protected IDataConfiguration dataConfig;
+
+ @Inject
+ protected ImportUriResolver uriResolver;
public int runGenerator(String[] args) {
if (args.length == 0) {
@@ -63,54 +83,103 @@ public class Main extends AbstractGenerator {
// parsing arguments
String genModelPath = null;
List<String> uriList = new ArrayList<String>();
- boolean genInstDiag = false;
+ boolean genDocumentation = false;
boolean asLibrary = false;
+ boolean debug = false;
for (int i=0; i<args.length; ++i) {
if (args[i].equals(OPTION_SAVE_GEN_MODEL)) {
if (++i<args.length) {
genModelPath = args[i]+"/genmodel.egm";
}
}
- else if (args[i].equals(OPTION_GEN_INST_DIAG)) {
- genInstDiag = true;
+ else if (args[i].equals(OPTION_DOCUMENTATION)) {
+ genDocumentation = true;
}
else if (args[i].equals(OPTION_LIB)) {
asLibrary = true;
}
+ else if (args[i].equals(OPTION_NOEXIT)) {
+ setTerminateOnError(false);
+ }
+ else if (args[i].equals(OPTION_DEBUG)) {
+ debug = true;
+ }
else {
uriList.add(args[i]);
}
}
setupRoomModel();
+ dataConfig.doSetup();
- if (!runGenerator(uriList, genModelPath, genInstDiag, asLibrary))
+ if (!runGenerator(uriList, genModelPath, genDocumentation, asLibrary, debug))
return GENERATOR_ERROR;
return GENERATOR_OK;
}
- protected boolean runGenerator(List<String> uriList, String genModelPath, boolean genInstDiag, boolean asLibrary) {
- ResourceSet rs = resourceSetProvider.get();
-
- loadModels(uriList, rs);
+ protected boolean runGenerator(List<String> uriList, String genModelPath, boolean genDocumentation, boolean asLibrary, boolean debug) {
+ loadModels(uriList);
- if (!validateModels(rs))
+ if (!validateModels())
+ return false;
+
+ if(!dataConfig.setResources(getResourceSet(), logger))
return false;
- Root genModel = createGeneratorModel(rs, asLibrary, genModelPath);
+ Root genModel = createGeneratorModel(asLibrary, genModelPath);
if (genModel==null)
return false;
+ if (!validator.validate(genModel))
+ return false;
+
+ ETMapUtil.processModels(genModel, getResourceSet());
+ if (debug) {
+ logger.logInfo("-- begin dump of mappings");
+ logger.logInfo(ETMapUtil.dumpMappings());
+ logger.logInfo("-- end dump of mappings");
+ }
+
logger.logInfo("-- starting code generation");
fileAccess.setOutputPath("src-gen/");
mainGenerator.doGenerate(genModel.eResource(), fileAccess);
- if (genInstDiag) {
- // mainDocGenerator.doGenerate(genModel);
+ if (genDocumentation) {
+ mainDocGenerator.doGenerate(genModel);
+ }
+
+ if (diagnostician.isFailed()) {
+ logger.logInfo("validation failed during build of generator model");
+ logger.logError("-- terminating", null);
+ return false;
}
logger.logInfo("-- finished code generation");
return true;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.etrice.generator.base.AbstractGenerator#addReferencedModels(org.eclipse.emf.ecore.resource.Resource, java.util.List)
+ */
+ @Override
+ protected void addReferencedModels(EObject root, IResourceURIAcceptor acceptor) {
+ super.addReferencedModels(root, acceptor);
+
+ if (root instanceof PhysicalModel) {
+ for (org.eclipse.etrice.core.etphys.eTPhys.Import imp : ((PhysicalModel)root).getImports()) {
+ String importURI = uriResolver.resolve(imp);
+ acceptor.addResourceURI(importURI);
+ }
+ }
+ else if (root instanceof MappingModel) {
+ for (org.eclipse.etrice.core.etmap.eTMap.Import imp : ((MappingModel)root).getImports()) {
+ String importURI = uriResolver.resolve(imp);
+ acceptor.addResourceURI(importURI);
+ }
+ }
+ else {
+ dataConfig.addReferencedModels(acceptor, root);
+ }
+ }
}
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
index c3f1c6456..adcb47143 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
@@ -10,56 +10,95 @@
*
*******************************************************************************/
-package org.eclipse.etrice.generator.cpp.gen
-
-import com.google.inject.Inject
-import java.util.List
-import org.eclipse.etrice.core.config.AttrInstanceConfig
-import org.eclipse.etrice.core.room.ActorClass
-import org.eclipse.etrice.core.room.PrimitiveType
-import org.eclipse.etrice.generator.generic.ConfigExtension
-import org.eclipse.etrice.generator.generic.ProcedureHelpers
+package org.eclipse.etrice.generator.cpp.gen
+
+import com.google.inject.Inject
+import java.util.ArrayList
+import java.util.List
+import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance
+import org.eclipse.etrice.core.room.ActorClass
+import org.eclipse.etrice.core.room.Attribute
+import org.eclipse.etrice.core.room.DataClass
+import org.eclipse.etrice.core.room.GeneralProtocolClass
+import org.eclipse.etrice.core.room.InterfaceItem
+import org.eclipse.etrice.core.room.PrimitiveType
+import org.eclipse.etrice.core.room.ProtocolClass
+import org.eclipse.etrice.generator.base.IDataConfiguration
+import org.eclipse.etrice.generator.generic.ProcedureHelpers
+import org.eclipse.etrice.generator.generic.RoomExtensions
import org.eclipse.etrice.generator.generic.TypeHelpers
-
+import org.eclipse.etrice.core.room.ExternalType
class ConfigGenAddon {
@Inject extension CppExtensions stdExt
@Inject extension TypeHelpers typeHelpers
@Inject extension ProcedureHelpers helpers
- @Inject extension ConfigExtension configExt
+ @Inject IDataConfiguration dataConfigExt
+ @Inject extension RoomExtensions
// For SubSystemClassGen
- def public applyInstanceConfig(String instance, String className, List<AttrInstanceConfig> attrConfigs){'''
- «FOR attrConfig : attrConfigs»
- «var a = attrConfig.attribute»
- «var aType = a.refType.type»
- «IF aType.primitive»
- «var values = attrConfig.value?.values»
- «IF values == null»
- «ELSEIF a.size == 0 || aType.characterType»
- «instance».«a.name.invokeSetter(className, (aType as PrimitiveType).toValueLiteral(values.get(0)))»;
- «ELSEIF a.size == values.size»
- «instance».«a.name.invokeSetter(className, "new "+aType.typeName+"[]"+(aType as PrimitiveType).toArrayValueLiteral(values))»;
- «ELSE»
+ def public genActorInstanceConfig(ActorInstance ai, String aiVariableName){'''
+ «FOR a : ai.actorClass.attributes»
+ «applyInstanceConfig(ai, null, aiVariableName, new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
+ «FOR p : ai.actorClass.allEndPorts»
+ «FOR a : getAttributes(p.protocol, !p.conjugated)»
+ «applyInstanceConfig(ai, p, aiVariableName+"."+invokeGetter(p.name, null), new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
+ «ENDFOR»
+ «FOR sap : ai.actorClass.allSAPs»
+ «FOR a : getAttributes(sap.protocol, true)»
+ «applyInstanceConfig(ai, sap, aiVariableName+"."+invokeGetter(sap.name, null), new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
+ «ENDFOR»
+ '''
+ }
+
+ def private List<Attribute> getAttributes(GeneralProtocolClass gpc, boolean regular){
+ var result = new ArrayList<Attribute>
+ if(gpc instanceof ProtocolClass){
+ var protocol = gpc as ProtocolClass
+ if(regular && protocol.regular?.attributes != null)
+ result.addAll(protocol.regular.attributes)
+ else if(!regular && protocol.conjugate?.attributes != null)
+ result.addAll(protocol.conjugate.attributes)
+ }
+ return result
+ }
+
+ def private applyInstanceConfig(ActorInstance ai, InterfaceItem port, String invokes, List<Attribute> path){
+ var a = path.last
+ var aType = a.refType.type
+ if(aType.primitive){
+ var value = if(port==null)dataConfigExt.getAttrInstanceConfigValue(ai, path)
+ else dataConfigExt.getAttrInstanceConfigValue(ai, port, path)
+ if(value == null)
+ ''''''
+ else if(a.size == 0 || aType.characterType)
+ '''«invokes».«a.name.invokeSetter(null, (aType as PrimitiveType).toValueLiteral(value))»;'''
+ else if(a.size == value.split(",").size){
+ var arrayExpr = '''{ «FOR s : value.split(",") SEPARATOR ', '»«(aType as PrimitiveType).toValueLiteral(s.trim)»«ENDFOR» }'''
+ '''«invokes».«a.name.invokeSetter(null, '''new «aType.typeName»[] «arrayExpr»'''.toString)»;'''
+ } else '''
{
- «aType.typeName»[] array = «instance».«a.name.invokeGetter(className)»;
+ «aType.typeName»[] array = «invokes».«a.name.invokeGetter(null)»;
for (int i=0;i<«a.size»;i++){
- array[i] = «(aType as PrimitiveType).toValueLiteral(values.get(0))»;
- }
- }
- «ENDIF»
- «ELSEIF aType.dataClass»
- «(instance+"."+a.name.invokeGetter(className)).applyInstanceConfig(aType.typeName, attrConfig.attributes)»
- «ENDIF»
- «ENDFOR»
- '''}
+ array[i] = «(aType as PrimitiveType).toValueLiteral(value)»;
+ }'''
+ }
+ else if (aType.dataClass)'''
+ «FOR e : (aType as DataClass).attributes»
+ «applyInstanceConfig(ai, port, invokes+"."+a.name.invokeGetter(null), path.union(e))»
+ «ENDFOR»
+ '''
+ }
// For ActorClassGen
def public genDynConfigGetterSetter(ActorClass ac){'''
- «FOR a : ac.getDynConfigAttributes(true, false)»
+ «FOR a : dataConfigExt.getDynConfigReadAttributes(ac)»
public «a.refType.type.typeName»«IF a.size>0»[]«ENDIF» get«a.name.toFirstUpper»(){
if(lock_«a.name» == null)
return «a.name»;
@@ -80,7 +119,7 @@ class ConfigGenAddon {
return lock_«a.name»;
}
«ENDFOR»
- «FOR a : ac.getDynConfigAttributes(false, true)»
+ «FOR a : dataConfigExt.getDynConfigWriteAttributes(ac)»
public void setAndWrite«a.name.toFirstUpper»(«a.refType.type.typeName»«IF a.size>0»[]«ENDIF» «a.name»){
set«a.name.toFirstUpper»(«a.name»);
variableService.write(this.getInstancePath()+"/«a.name»", «a.name»);
@@ -89,33 +128,52 @@ class ConfigGenAddon {
'''}
def public genMinMaxConstants(ActorClass ac){
- var attrConfigs = ac.allAttrConfigFlat.filter(c | c.min != null || c.max != null)
- '''
- «IF !attrConfigs.empty»
- //--------------------- attribute specifications
- «ENDIF»
-
- «FOR c : attrConfigs»
- «var aType = (c.attribute.refType.type as PrimitiveType)»
- «IF c.min != null»
- public static «aType.minMaxType» MIN«c.getPath(false, false, true, true).toPath("_")» = «aType.toValueLiteral(c.min.value)»;
- «ENDIF»
- «IF c.max != null»
- public static «aType.minMaxType» MAX«c.getPath(false, false, true, true).toPath("_")» = «aType.toValueLiteral(c.max.value)»;
- «ENDIF»
- «ENDFOR»
+ var result = '''
+ «FOR a : ac.attributes»
+ «genMinMaxConstantsRec(ac, a.name, new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
'''
+ if(result.length != 0)
+ result = result+'''//--------------------- Attribute Specifications'''
+ return result
+ }
+
+ def private genMinMaxConstantsRec(ActorClass ac, String varNamePath, List<Attribute> path){
+ var temp = null as String
+ if (path.last.refType.type.dataClass)
+ '''
+ «FOR e : (path.last.refType.type as DataClass).allAttributes»
+ «genMinMaxConstantsRec(ac, varNamePath+"_"+e.name, path.union(e))»
+ «ENDFOR»
+ '''
+ else if (path.last.refType.type instanceof ExternalType) {
+ // do nothing
+ }
+ else
+ {
+ var aType = (path.last.refType.type as PrimitiveType)
+ '''
+ «IF (temp = dataConfigExt.getAttrClassConfigMinValue(ac, path)) != null»
+ public static «aType.minMaxType» MIN_«varNamePath» = «aType.toValueLiteral(temp)»;
+ «ENDIF»
+ «IF (temp = dataConfigExt.getAttrClassConfigMaxValue(ac, path)) != null»
+ public static «aType.minMaxType» MAX_«varNamePath» = «aType.toValueLiteral(temp)»;
+ «ENDIF»
+ '''
+ }
}
def private getMinMaxType(PrimitiveType type){
- switch(type.typeName){
+ return switch(type.typeName){
case "byte":
- return "int"
+ "int"
case "short":
- return "int"
+ "int"
case "float":
- return "double"
+ "double"
+ default:
+ type.typeName
}
- return type.typeName
}
-} \ No newline at end of file
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend
index 69ff87af4..2dc3d42cf 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend
@@ -28,7 +28,6 @@ import org.eclipse.etrice.core.room.PrimitiveType
import org.eclipse.etrice.core.room.RoomClass
import org.eclipse.etrice.core.room.VarDecl
import org.eclipse.etrice.core.room.DataClass
-import org.eclipse.etrice.generator.generic.ConfigExtension
import org.eclipse.etrice.generator.generic.ILanguageExtension
import org.eclipse.etrice.generator.generic.TypeHelpers
import org.eclipse.xtext.util.Pair
@@ -36,9 +35,7 @@ import org.eclipse.xtext.util.Pair
@Singleton
class CppExtensions implements ILanguageExtension {
- @Inject ILanguageExtension languageExt
@Inject IDiagnostician diagnostician
- @Inject extension ConfigExtension
@Inject extension TypeHelpers
@@ -134,10 +131,6 @@ class CppExtensions implements ILanguageExtension {
baseClassName+"::"+method+"("+arguments+");"
}
- override toCharArrayExpr(String s) {
- "\"" + s + "\"";
- }
-
override String toValueLiteral(PrimitiveType type, String value){
throw new UnsupportedOperationException("TODO Config for Cpp");
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend
index a684bead5..96199a1e4 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend
@@ -1,27 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
package org.eclipse.etrice.generator.cpp.gen
-import org.eclipse.etrice.core.room.Attribute
-import java.util.List
import com.google.inject.Inject
-import org.eclipse.etrice.generator.generic.ConfigExtension
-import org.eclipse.etrice.generator.generic.TypeHelpers
+import com.google.inject.Singleton
+import java.util.List
+import org.eclipse.etrice.core.room.Attribute
import org.eclipse.etrice.core.room.ComplexType
+import org.eclipse.etrice.generator.base.IDataConfiguration
import org.eclipse.etrice.generator.generic.ILanguageExtension
-import com.google.inject.Singleton
+import org.eclipse.etrice.generator.generic.ProcedureHelpers
+import org.eclipse.etrice.generator.generic.RoomExtensions
+import org.eclipse.etrice.generator.generic.TypeHelpers
@Singleton
class Initialization {
- @Inject extension ConfigExtension
@Inject extension TypeHelpers
+ @Inject extension RoomExtensions
@Inject ILanguageExtension languageExt
+ @Inject IDataConfiguration dataConfigExt
+ @Inject ProcedureHelpers procedureHelpers
def attributeInitialization(List<Attribute> attribs, boolean useClassDefaultsOnly) {
'''
// initialize attributes
«FOR a : attribs»
«var aType = a.refType.type»
- «var value = a.initValueLiteral»
+ «var value = a.defaultValueLiteral»
«IF value!=null»
«IF a.size == 0 || aType.characterType»
«ELSEIF value.startsWith("{")»
@@ -53,7 +69,7 @@ class Initialization {
def attributeInitialization(Attribute a, boolean useClassDefaultsOnly) {
var aType = a.refType.type
- var value = a.initValueLiteral
+ var value = a.defaultValueLiteral
if (value != null) {
if (a.size == 0 || aType.characterType) {
if (a.refType.isRef)
@@ -79,5 +95,6 @@ class Initialization {
'''«a.name»()'''
}
}
-
+
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
index eedcc9104..4f48ae6d4 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
@@ -5,18 +5,16 @@ package org.eclipse.etrice.generator.cpp.gen
import com.google.inject.Inject
import com.google.inject.Singleton
import org.eclipse.etrice.core.genmodel.base.ILogger
+import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance
import org.eclipse.etrice.core.genmodel.etricegen.Root
import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance
import org.eclipse.etrice.core.room.SubSystemClass
-import org.eclipse.etrice.generator.generic.ConfigExtension
import org.eclipse.etrice.generator.generic.ProcedureHelpers
import org.eclipse.etrice.generator.generic.RoomExtensions
-import org.eclipse.etrice.generator.generic.TypeHelpers
-import org.eclipse.etrice.generator.cpp.gen.ConfigGenAddon
import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import static extension org.eclipse.etrice.generator.base.Indexed.*
-import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance
+import org.eclipse.etrice.generator.base.IDataConfiguration
@Singleton
@@ -25,9 +23,9 @@ class SubSystemClassGen {
@Inject JavaIoFileSystemAccess fileAccess
@Inject extension CppExtensions
@Inject extension RoomExtensions
- @Inject extension ConfigExtension
@Inject extension ProcedureHelpers
- @Inject extension TypeHelpers
+ @Inject IDataConfiguration dataConfigExt
+ @Inject ConfigGenAddon configGenAddon
@Inject ConfigGenAddon configAddon
@Inject ILogger logger
@@ -61,11 +59,11 @@ class SubSystemClassGen {
/**
* @author generated by eTrice
*
- * Header File of SubSystemClass «comp.name»
+ * Header File of SubSystemClass «cc.name»
*
*/
- «generateIncludeGuardBegin(comp.name)»
+ «generateIncludeGuardBegin(cc.name)»
#include "platforms/generic/etDatatypes.h"
#include "common/messaging/IRTObject.h"
@@ -86,12 +84,12 @@ class SubSystemClassGen {
«cc.userCode(1)»
- class «comp.name» : public etRuntime::SubSystemClassBase{
+ class «cc.name» : public etRuntime::SubSystemClassBase{
«cc.userCode(2)»
public:
- «comp.name»(IRTObject* parent, std::string name)
+ «cc.name»(IRTObject* parent, std::string name)
: etRuntime::SubSystemClassBase(parent, name)
{
}
@@ -104,7 +102,7 @@ class SubSystemClassGen {
std::vector<etRuntime::MessageService*> m_msgServices;
};
- «generateIncludeGuardEnd(comp.name)»
+ «generateIncludeGuardEnd(cc.name)»
'''
}
@@ -127,21 +125,21 @@ class SubSystemClassGen {
using namespace etRuntime;
- void «comp.name»::receiveEvent(InterfaceItemBase* ifitem, int evt, void* data){
+ void «cc.name»::receiveEvent(InterfaceItemBase* ifitem, int evt, void* data){
}
- void «comp.name»::instantiateMessageServices(){
+ void «cc.name»::instantiateMessageServices(){
m_msgServices.push_back( new MessageService(this, Address(0, 0, 0),"MessageService_Main") );
«FOR thread : cc.threads»
- m_msgServices.push_back(new MessageService(this, Address(0, «cc.threads.indexOf(thread)+1», 0),"MessageService_«thread.name»", «thread.prio»));
+ m_msgServices.push_back(new MessageService(this, Address(0, «cc.threads.indexOf(thread)+1», 0),"MessageService_«thread.name»", /* threadprio */ 0));
«ENDFOR»
for (std::vector<MessageService*>::iterator it=m_msgServices.begin(); it != m_msgServices.end(); ++it) {
RTServices::getInstance().getMsgSvcCtrl().addMsgSvc( *(*it));
}
}
- void «comp.name»::instantiateActors(){
+ void «cc.name»::instantiateActors(){
// all addresses
// Addresses for the Subsystem Systemport
«FOR ai : comp.allContainedInstances.indexed(comp.maxObjId)»
@@ -186,15 +184,26 @@ class SubSystemClassGen {
);
«ENDFOR»
+««« // apply instance attribute configurations
+««« «FOR ai : comp.allContainedInstances»
+««« «IF !(ai.configAttributes.empty && ai.getConfigPorts.empty)»
+««« {
+««« «ai.actorClass.name» inst = («ai.actorClass.name») instances[«comp.allContainedInstances.indexOf(ai)»];
+««« «configAddon.applyInstanceConfig("inst", ai.actorClass.name, ai.configAttributes)»
+««« «FOR portConfig : ai.configPorts»
+««« «configAddon.applyInstanceConfig(("inst."+portConfig.item.name.invokeGetter(ai.actorClass.name)), portConfig.item.portClassName, portConfig.attributes)»
+««« «ENDFOR»
+««« }
+««« «ENDIF»
+««« «ENDFOR»
+
// apply instance attribute configurations
- «FOR ai : comp.allContainedInstances»
- «IF !(ai.configAttributes.empty && ai.getConfigPorts.empty)»
+ «FOR ai: comp.allContainedInstances»
+ «val cfg = configGenAddon.genActorInstanceConfig(ai, "inst")»
+ «IF cfg.length>0»
{
«ai.actorClass.name» inst = («ai.actorClass.name») instances[«comp.allContainedInstances.indexOf(ai)»];
- «configAddon.applyInstanceConfig("inst", ai.actorClass.name, ai.configAttributes)»
- «FOR portConfig : ai.configPorts»
- «configAddon.applyInstanceConfig(("inst."+portConfig.item.name.invokeGetter(ai.actorClass.name)), portConfig.item.portClassName, portConfig.attributes)»
- «ENDFOR»
+ «cfg»
}
«ENDIF»
«ENDFOR»
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
index 736f6bfea..bb050760c 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
@@ -19,10 +19,10 @@ class SubSystemRunnerGen {
def doGenerate(Root root) {
for (sc: root.subSystemInstances) {
fileAccess.setOutputPath(sc.subSystemClass.generationTargetPath+sc.subSystemClass.getPath)
- fileAccess.generateFile( sc.name+"_Runner.h", root.generateHeaderFile(sc, sc.subSystemClass))
+ fileAccess.generateFile( sc.subSystemClass.name+"_Runner.h", root.generateHeaderFile(sc, sc.subSystemClass))
fileAccess.setOutputPath(sc.subSystemClass.generationTargetPath+sc.subSystemClass.getPath)
- fileAccess.generateFile( sc.name+"_Runner.cpp", root.generateSourceFile(sc, sc.subSystemClass))
+ fileAccess.generateFile( sc.subSystemClass.name+"_Runner.cpp", root.generateSourceFile(sc, sc.subSystemClass))
}
}
@@ -30,15 +30,15 @@ class SubSystemRunnerGen {
/**
* @author generated by eTrice
*
- * this class contains the main function running component «ssc.name»
- * it instantiates «ssc.name» and starts and ends the lifecycle
+ * this class contains the main function running component «cc.name»
+ * it instantiates «cc.name» and starts and ends the lifecycle
*/
- «generateIncludeGuardBegin(ssc.name+"_Runner")»
+ «generateIncludeGuardBegin(cc.name+"_Runner")»
#include "common/modelbase/SubSystemRunnerBase.h"
- class «ssc.name+"Runner"» :public etRuntime::SubSystemRunnerBase {
+ class «cc.name+"Runner"» :public etRuntime::SubSystemRunnerBase {
/**
* main function
@@ -48,7 +48,7 @@ class SubSystemRunnerGen {
static void run();
};
- «generateIncludeGuardEnd(ssc.name+"_Runner")»
+ «generateIncludeGuardEnd(cc.name+"_Runner")»
'''
}
@@ -56,13 +56,13 @@ class SubSystemRunnerGen {
/**
* @author generated by eTrice
*
- * this class contains the main function running component «ssi.name»
- * it instantiates «ssi.name» and starts and ends the lifecycle
+ * this class contains the main function running component «ssc.name»
+ * it instantiates «ssc.name» and starts and ends the lifecycle
*/
- #include "«ssi.name».h"
- #include "«ssi.name»_Runner.h"
+ #include "«ssc.name».h"
+ #include "«ssc.name»_Runner.h"
#include <iostream>
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Validator.java b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Validator.java
new file mode 100644
index 000000000..0a6a77ef3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Validator.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.cpp.gen;
+
+import org.eclipse.etrice.core.genmodel.etricegen.Root;
+import org.eclipse.etrice.core.genmodel.base.ILogger;
+
+import com.google.inject.Inject;
+
+/**
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class Validator {
+
+ @Inject
+ private ILogger logger;
+
+ public boolean validate(Root genModel) {
+
+// currently unused
+
+ int errorCount = 0;
+// for (RoomModel mdl : genModel.getUsedRoomModels()) {
+// TreeIterator<EObject> it = mdl.eAllContents();
+// while (it.hasNext()) {
+// EObject obj = it.next();
+//
+// }
+// }
+
+ if (errorCount>0) {
+ logger.logError("C++ generator detected "+errorCount+" error(s) - terminating", null);
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/setup/GeneratorModule.java b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/setup/GeneratorModule.java
index 7973fccdc..09e946137 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/setup/GeneratorModule.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/setup/GeneratorModule.java
@@ -12,15 +12,18 @@
package org.eclipse.etrice.generator.cpp.setup;
+import org.eclipse.etrice.core.scoping.PlatformRelativeUriResolver;
import org.eclipse.etrice.generator.base.AbstractGenerator;
import org.eclipse.etrice.generator.base.GeneratorBaseModule;
+import org.eclipse.etrice.generator.base.IDataConfiguration;
import org.eclipse.etrice.generator.base.ITranslationProvider;
import org.eclipse.etrice.generator.cpp.Main;
+import org.eclipse.etrice.generator.cpp.gen.CppExtensions;
import org.eclipse.etrice.generator.cpp.gen.CppTranslationProvider;
import org.eclipse.etrice.generator.cpp.gen.MainGen;
import org.eclipse.etrice.generator.generic.ILanguageExtension;
import org.eclipse.xtext.generator.IGenerator;
-import org.eclipse.etrice.generator.cpp.gen.CppExtensions;
+import org.eclipse.xtext.scoping.impl.ImportUriResolver;
import com.google.inject.Binder;
@@ -38,7 +41,10 @@ public class GeneratorModule extends GeneratorBaseModule {
binder.bind(ITranslationProvider.class).to(CppTranslationProvider.class);
+ binder.bind(IDataConfiguration.class).to(org.eclipse.etrice.generator.config.DataConfiguration.class);
+ binder.bind(ImportUriResolver.class).to(PlatformRelativeUriResolver.class);
+
}
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.smap b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.smap
deleted file mode 100644
index 704f2d2f9..000000000
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.smap
+++ /dev/null
@@ -1,94 +0,0 @@
-SMAP
-ConfigGenAddon.java
-Xtend
-*S Xtend
-*F
-+ 0 ConfigGenAddon.xtend
-src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
-*L
-34:42,2
-35:44
-36:45,2
-37:47,3
-34:50
-38:51,2
-39:53,3
-34:56
-40:57,2
-34:59
-41:60,10
-42:70,10
-34:80
-43:81,5
-44:86,12
-34:98
-45:99,3
-47:102,12
-48:114,6
-49:120,11
-34:131,5
-53:136,2
-54:138,9
-34:147,6
-61:156,2
-62:158,3
-63:161,4
-61:165
-63:166,4
-61:170,2
-63:172,8
-64:180,6
-65:186,9
-67:195,6
-68:201,10
-71:211,8
-61:219
-71:220,4
-61:224,2
-71:226,7
-72:233,6
-73:239,12
-75:251,6
-76:257,13
-79:270,7
-80:277,6
-61:283,3
-83:286,3
-84:289,8
-61:297
-84:298,4
-61:302,2
-84:304,7
-85:311,10
-86:321,9
-61:330,3
-91:336,2
-92:338,17
-91:355,2
-94:357,5
-91:362,2
-96:364,2
-91:366
-98:367
-99:368,5
-91:373
-100:374,4
-101:378,13
-91:391,3
-103:394,4
-104:398,13
-91:411,4
-93:415
-91:416,2
-111:421,3
-112:424,3
-113:427
-112:428,2
-114:430,3
-115:433
-114:434,2
-116:436,3
-117:439
-116:440,2
-119:442
-*E
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java
index 8d6ba7423..4fffb7d1c 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java
@@ -17,7 +17,6 @@ import org.eclipse.etrice.core.room.PrimitiveType;
import org.eclipse.etrice.core.room.RefableType;
import org.eclipse.etrice.core.room.RoomClass;
import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.generator.generic.ConfigExtension;
import org.eclipse.etrice.generator.generic.ILanguageExtension;
import org.eclipse.etrice.generator.generic.TypeHelpers;
import org.eclipse.xtend2.lib.StringConcatenation;
@@ -29,15 +28,9 @@ import org.eclipse.xtext.xbase.lib.Conversions;
@SuppressWarnings("all")
public class CppExtensions implements ILanguageExtension {
@Inject
- private ILanguageExtension languageExt;
-
- @Inject
private IDiagnostician diagnostician;
@Inject
- private ConfigExtension _configExtension;
-
- @Inject
private TypeHelpers _typeHelpers;
public String getTypedDataDefinition(final Message m) {
@@ -223,12 +216,6 @@ public class CppExtensions implements ILanguageExtension {
return _plus_4;
}
- public String toCharArrayExpr(final String s) {
- String _plus = ("\"" + s);
- String _plus_1 = (_plus + "\"");
- return _plus_1;
- }
-
public String toValueLiteral(final PrimitiveType type, final String value) {
UnsupportedOperationException _unsupportedOperationException = new UnsupportedOperationException("TODO Config for Cpp");
throw _unsupportedOperationException;
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/MainGen.smap b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/MainGen.smap
deleted file mode 100644
index 8c098acdf..000000000
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/MainGen.smap
+++ /dev/null
@@ -1,22 +0,0 @@
-SMAP
-MainGen.java
-Xtend
-*S Xtend
-*F
-+ 0 MainGen.xtend
-src/org/eclipse/etrice/generator/cpp/gen/MainGen.xtend
-*L
-34:40
-35:41,2
-36:43
-37:44
-36:45
-35:46
-43:50
-44:51
-45:52
-46:53
-48:54,3
-49:57
-48:58
-*E
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.smap b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.smap
deleted file mode 100644
index e0fd14248..000000000
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.smap
+++ /dev/null
@@ -1,47 +0,0 @@
-SMAP
-StateMachineGen.java
-Xtend
-*S Xtend
-*F
-+ 0 StateMachineGen.xtend
-src/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.xtend
-*L
-30:30,2
-31:32
-30:33
-32:34,16
-30:50,2
-47:55,2
-48:57
-47:58
-49:59
-50:60,3
-47:63
-50:64,3
-47:67,3
-50:70
-47:71
-50:72,5
-47:77,2
-51:79,6
-59:85,21
-49:106
-47:107,2
-70:112,3
-71:115
-70:116,2
-71:118
-70:119,3
-73:122,2
-74:124,2
-75:126
-76:127,9
-75:136
-79:137
-83:141,2
-87:146
-91:150
-95:154
-99:158,2
-103:163
-*E
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.smap b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.smap
deleted file mode 100644
index c1c4867e8..000000000
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.smap
+++ /dev/null
@@ -1,167 +0,0 @@
-SMAP
-SubSystemClassGen.java
-Xtend
-*S Xtend
-*F
-+ 0 SubSystemClassGen.xtend
-src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
-*L
-35:58,3
-36:61,5
-37:66,2
-38:68,5
-39:73
-40:74,3
-42:77,3
-43:80,5
-44:85
-45:86,3
-35:89,2
-59:94,14
-64:108,11
-68:119,40
-59:159
-82:160,2
-59:162,2
-84:164,5
-87:169,7
-89:176,7
-91:183,9
-94:192,38
-107:230,4
-59:234
-111:238,14
-116:252,12
-120:264,10
-111:274
-123:275,4
-124:279,8
-111:287,2
-125:289,12
-130:301,11
-133:312,9
-111:321
-136:322,4
-137:326,12
-111:338,2
-138:340,16
-144:356,10
-111:366
-147:367,6
-148:373,9
-111:382,2
-149:384,2
-111:386
-151:387,4
-152:391,9
-154:400,13
-155:413,3
-111:416
-156:417,2
-111:419
-157:420,2
-111:422
-158:423,3
-159:426,5
-160:431,14
-111:445,3
-162:448,2
-163:450,11
-111:461,6
-166:467,6
-169:473,5
-111:478
-170:479,7
-172:486,7
-174:493,4
-175:497,7
-177:504,9
-111:513
-178:514,6
-111:520
-180:521,3
-181:524,6
-111:530,2
-182:532,3
-183:535,6
-184:541,6
-185:547,7
-111:554,2
-187:556,4
-111:560
-190:561,2
-111:563
-191:564,15
-193:579,14
-194:593,6
-111:599
-195:600,3
-196:603,12
-111:615,2
-197:617,2
-111:619,4
-200:623,13
-206:636,5
-111:641
-207:642,4
-208:646,9
-111:655,2
-209:657,2
-210:659,5
-111:664
-211:665,4
-212:669,9
-111:678,2
-213:680,27
-111:707
-227:711,2
-228:713,6
-230:719,4
-231:723,9
-233:732,7
-227:739
-234:740,2
-227:742
-235:743,2
-227:745
-236:746,4
-237:750,7
-227:757
-238:758
-239:759,11
-227:770
-240:771,2
-241:773,19
-227:792,5
-244:797
-245:798,7
-246:805,11
-227:816,2
-248:818,11
-227:829,3
-253:835,2
-254:837,6
-256:843,4
-257:847,9
-259:856,7
-253:863
-260:864,2
-253:866
-261:867,10
-253:877,2
-263:879,4
-264:883,7
-253:890
-265:891
-266:892,11
-253:903
-267:904,2
-253:906
-268:907,2
-269:909,19
-253:928
-271:929,15
-253:944,6
-275:950,10
-253:960,5
-*E
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.smap b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.smap
deleted file mode 100644
index e73e35954..000000000
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.smap
+++ /dev/null
@@ -1,31 +0,0 @@
-SMAP
-SubSystemRunnerGen.java
-Xtend
-*S Xtend
-*F
-+ 0 SubSystemRunnerGen.xtend
-src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
-*L
-20:27,3
-21:30,6
-22:36,5
-24:41,6
-25:47,5
-20:52,2
-29:57,11
-33:68,5
-34:73,8
-37:81,10
-41:91,27
-51:118,5
-29:123
-55:127,11
-59:138,5
-60:143,10
-64:153,5
-65:158,24
-76:182,15
-81:197,6
-82:203,56
-55:259
-*E
diff --git a/plugins/org.eclipse.etrice.generator.launch.cpp/src/org/eclipse/etrice/generator/launch/cpp/CppGeneratorLaunchConfigurationDelegate.java b/plugins/org.eclipse.etrice.generator.launch.cpp/src/org/eclipse/etrice/generator/launch/cpp/CppGeneratorLaunchConfigurationDelegate.java
index 1d6a25f1b..afe0c36d9 100644
--- a/plugins/org.eclipse.etrice.generator.launch.cpp/src/org/eclipse/etrice/generator/launch/cpp/CppGeneratorLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.etrice.generator.launch.cpp/src/org/eclipse/etrice/generator/launch/cpp/CppGeneratorLaunchConfigurationDelegate.java
@@ -37,7 +37,7 @@ public class CppGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConf
argString.append(" "+configuration.getAttribute(CppGeneratorConfigTab.GEN_MODEL_PATH, "?"));
}
if (configuration.getAttribute(CppGeneratorConfigTab.GEN_INSTANCE_DIAGRAM, false))
- argString.append(" "+Main.OPTION_GEN_INST_DIAG);
+ argString.append(" "+Main.OPTION_DOCUMENTATION);
}
/* (non-Javadoc)

Back to the top