Jelajahi Sumber

fixed #1588 - removed invalid include and fixed declaration order for event stuff (#1593)

Axel Terfloth 8 tahun lalu
induk
melakukan
3f1d815352

+ 7 - 5
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/Naming.xtend

@@ -1,9 +1,10 @@
 /**
-  Copyright (c) 2013 committers of YAKINDU and others.
+  Copyright (c) 2013-2017 committers of YAKINDU and others.
   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:
   	Markus Mühlbrandt - Initial contribution and API
  */
@@ -26,6 +27,11 @@ import org.yakindu.sct.model.stext.stext.OperationDefinition
 import org.yakindu.sct.model.stext.stext.StatechartScope
 import org.yakindu.sct.model.stext.stext.VariableDefinition
 
+
+/**
+ * @author Markus Mühlbrands - Initial contribution and API
+ * @author Axel Terfloth - updates
+ */
 class Naming extends org.yakindu.sct.generator.c.Naming {
 
 	@Inject extension Navigation
@@ -60,10 +66,6 @@ class Naming extends org.yakindu.sct.generator.c.Naming {
 		'TimerInterface'
 	}
 	
-	def eventClasses(ExecutionFlow it) {
-		'''«name.toFirstUpper»_Events'''.toString
-	}
-
 	def timerInstance() {
 		'timer'
 	}

+ 2 - 2
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenStatemachineHeader.xtend

@@ -21,6 +21,7 @@ import org.yakindu.sct.model.stext.stext.StatechartScope
 
 /**
  * @author René Beckmann - Initial contribution and API
+ * @author Axel Terfloth - updates
  */
 class EventDrivenStatemachineHeader extends StatemachineHeader {
 	@Inject extension EventNaming
@@ -28,7 +29,7 @@ class EventDrivenStatemachineHeader extends StatemachineHeader {
 	
 	override preStatechartDeclarations(ExecutionFlow it) {
 		'''
-		«super.postStatechartDeclarations(it)»
+		«super.preStatechartDeclarations(it)»
 		
 		«events.content(it)»
 		'''
@@ -54,7 +55,6 @@ class EventDrivenStatemachineHeader extends StatemachineHeader {
 	override includes(ExecutionFlow it, extension IGenArtifactConfigurations artifactConfigs) {
 		'''
 		#include <deque>
-		#include "«eventClasses.h»"
 		«super.includes(it, artifactConfigs)»
 		'''
 	}