Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2017-08-29 11:07:49 -0400
committerHenrik Rentz-Reichert2017-08-29 11:13:10 -0400
commit04647080b992f0e78286475c0d079b90728e2e6c (patch)
tree3e94896764d04aee6b724dacee1ca6e441c88f6a /plugins/org.eclipse.etrice.generator.cpp
parente8aed4ad25ee7451045ddb0f3b6ec12eccee238e (diff)
downloadorg.eclipse.etrice-04647080b992f0e78286475c0d079b90728e2e6c.tar.gz
org.eclipse.etrice-04647080b992f0e78286475c0d079b90728e2e6c.tar.xz
org.eclipse.etrice-04647080b992f0e78286475c0d079b90728e2e6c.zip
Bug 521498 - [genmodel, generators] gen. only explicitly passed models
* generate only models that are passed on the command line * also in non-lib mode generate all ROOM classes Change-Id: Ib0766d77ba9de3c1b4de4d9b97c0a301241603a2
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.cpp')
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java15
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java4
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.java4
6 files changed, 16 insertions, 13 deletions
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
index a9366db52..6ff717e2d 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
@@ -42,7 +42,7 @@ class ActorClassGen extends GenericActorClassGenerator {
def doGenerate(Root root) {
val Map<ActorClass, WiredActorClass> ac2wired = newHashMap
root.wiredInstances.filter(typeof(WiredActorClass)).forEach[ac2wired.put(actorClass, it)]
- for (xpac: root.xpActorClasses.filter(cl|cl.actorClass.isValidGenerationLocation)) {
+ for (xpac: root.actorClasses.filter[isValidGenerationLocation].map[root.getExpandedActorClass(it)]) {
val wired = ac2wired.get(xpac.actorClass)
val manualBehavior = xpac.actorClass.isBehaviorAnnotationPresent("BehaviorManual")
val path = xpac.actorClass.generationTargetPath+xpac.actorClass.getPath
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend
index 8c31b08d6..105f639fc 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend
@@ -38,7 +38,7 @@ class DataClassGen {
def doGenerate(Root root) {
logger.logInfo("generating code")
- for (dc: root.usedDataClasses) {
+ for (dc: root.dataClasses) {
var path = dc.generationTargetPath + dc.getPath
// header file
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
index 223cf131d..38f0da881 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
@@ -47,7 +47,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
def doGenerate(Root root) {
- for (pc: root.usedProtocolClasses.filter(cl|cl.isValidGenerationLocation)) {
+ for (pc: root.protocolClasses.filter(cl|cl.isValidGenerationLocation)) {
val path = pc.generationTargetPath+pc.getPath
val infopath = pc.generationInfoPath+pc.getPath
switch (pc.commType) {
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java
index aa325c002..fb693fa07 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java
@@ -92,13 +92,16 @@ public class ActorClassGen extends GenericActorClassGenerator {
ac2wired.put(_actorClass, it);
};
_filter.forEach(_function);
- EList<ExpandedActorClass> _xpActorClasses = root.getXpActorClasses();
- final Function1<ExpandedActorClass, Boolean> _function_1 = (ExpandedActorClass cl) -> {
- ActorClass _actorClass = cl.getActorClass();
- return Boolean.valueOf(this._fileSystemHelpers.isValidGenerationLocation(_actorClass));
+ EList<ActorClass> _actorClasses = root.getActorClasses();
+ final Function1<ActorClass, Boolean> _function_1 = (ActorClass it) -> {
+ return Boolean.valueOf(this._fileSystemHelpers.isValidGenerationLocation(it));
};
- Iterable<ExpandedActorClass> _filter_1 = IterableExtensions.<ExpandedActorClass>filter(_xpActorClasses, _function_1);
- for (final ExpandedActorClass xpac : _filter_1) {
+ Iterable<ActorClass> _filter_1 = IterableExtensions.<ActorClass>filter(_actorClasses, _function_1);
+ final Function1<ActorClass, ExpandedActorClass> _function_2 = (ActorClass it) -> {
+ return root.getExpandedActorClass(it);
+ };
+ Iterable<ExpandedActorClass> _map = IterableExtensions.<ActorClass, ExpandedActorClass>map(_filter_1, _function_2);
+ for (final ExpandedActorClass xpac : _map) {
{
ActorClass _actorClass = xpac.getActorClass();
final WiredActorClass wired = ac2wired.get(_actorClass);
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java
index 90aef2972..f97e5e339 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java
@@ -71,8 +71,8 @@ public class DataClassGen {
public void doGenerate(final Root root) {
this.logger.logInfo("generating code");
- EList<DataClass> _usedDataClasses = root.getUsedDataClasses();
- for (final DataClass dc : _usedDataClasses) {
+ EList<DataClass> _dataClasses = root.getDataClasses();
+ for (final DataClass dc : _dataClasses) {
{
String _generationTargetPath = this.roomExt.getGenerationTargetPath(dc);
String _path = this.roomExt.getPath(dc);
diff --git a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.java
index 844f3f2f3..9f3ceacb5 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.java
@@ -85,11 +85,11 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
private ILogger logger;
public void doGenerate(final Root root) {
- EList<ProtocolClass> _usedProtocolClasses = root.getUsedProtocolClasses();
+ EList<ProtocolClass> _protocolClasses = root.getProtocolClasses();
final Function1<ProtocolClass, Boolean> _function = (ProtocolClass cl) -> {
return Boolean.valueOf(this._fileSystemHelpers.isValidGenerationLocation(cl));
};
- Iterable<ProtocolClass> _filter = IterableExtensions.<ProtocolClass>filter(_usedProtocolClasses, _function);
+ Iterable<ProtocolClass> _filter = IterableExtensions.<ProtocolClass>filter(_protocolClasses, _function);
for (final ProtocolClass pc : _filter) {
{
String _generationTargetPath = this.roomExt.getGenerationTargetPath(pc);

Back to the top