Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-02-20 14:39:26 +0000
committerHenrik Rentz-Reichert2012-02-20 14:39:26 +0000
commit82ccdad95b178e017ff657e7c8dbd5492639b3d0 (patch)
tree63d554999681d87005d8d18456f515596a9ed1a1 /plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
parent75040cb3a48b029271bd431075fbee68f03b40de (diff)
downloadorg.eclipse.etrice-82ccdad95b178e017ff657e7c8dbd5492639b3d0.tar.gz
org.eclipse.etrice-82ccdad95b178e017ff657e7c8dbd5492639b3d0.tar.xz
org.eclipse.etrice-82ccdad95b178e017ff657e7c8dbd5492639b3d0.zip
[generator, generator.c] some fixes, added actor attributes
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend')
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
index f6c264741..bea5bdd0a 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
@@ -108,6 +108,9 @@ class CExtensions implements ILanguageExtension {
}
override String genEnumeration(String name, List<Pair<String, String>> entries) {
+ if (entries.empty)
+ return "/* empty enum not generated */"
+
'''
enum «name» {
«FOR entry: entries SEPARATOR ","»

Back to the top