浏览代码

removed unused rules since fixed ecore is used now.

use dynamic package registration to avoid dependency on generated code
during language generation.
Andreas Muelder 8 年之前
父节点
当前提交
45c625b9cd

+ 6 - 4
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/GenerateSText.mwe2

@@ -15,12 +15,14 @@ Workflow {
 		platformUri = "${runtimeProject}/.."
 		registerGenModelFile = "platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.genmodel"
 		registerGenModelFile = "platform:/resource/org.yakindu.sct.model.stext/model/SText.genmodel"
+		registerGenModelFile = "platform:/resource/org.yakindu.base.types/model/base.genmodel"
 		registerGenModelFile = "platform:/resource/org.yakindu.base.types/model/types.genmodel"
 		registerGenModelFile = "platform:/resource/org.yakindu.base.expressions/model/Expressions.genmodel"
-		registerGeneratedEPackage = "org.yakindu.sct.model.sgraph.SGraphPackage"
-		registerGeneratedEPackage = "org.yakindu.base.types.TypesPackage"
-		registerGeneratedEPackage = "org.yakindu.base.expressions.expressions.ExpressionsPackage"
-		registerGeneratedEPackage = "org.yakindu.sct.model.stext.stext.StextPackage"
+		registerEcoreFile ="platform:/resource/org.yakindu.base.types/model/base.ecore"
+		registerEcoreFile ="platform:/resource/org.yakindu.base.types/model/types.ecore"
+		registerEcoreFile ="platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore"
+		registerEcoreFile ="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore"
+		registerEcoreFile ="platform:/resource/org.yakindu.sct.model.stext/model/SText.ecore"
 	}
 
 	component = DirectoryCleaner {

+ 0 - 14
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

@@ -27,8 +27,6 @@ TransitionRoot:
 /* ---- start rules ----
 Define the starting points used by the statechart integration. These rules hook in the concrete rules of the specific grammar.
 */
-ScopedElement returns sgraph::ScopedElement:
-	StatechartSpecification;
 
 StatechartSpecification:
 	{StatechartSpecification} ('namespace' namespace=FQN)?
@@ -41,18 +39,12 @@ StateSpecification:
 TransitionSpecification:
 	reaction=TransitionReaction;
 
-Scope returns sgraph::Scope:
-	(StateScope | StatechartScope);
-
 StateScope returns sgraph::Scope:
 	{SimpleScope} (reactions+=(LocalReaction))*;
 
 StatechartScope:
 	InterfaceScope | InternalScope | ImportScope;
 
-NamedInterfaceScope returns base::NamedElement:
-	InterfaceScope;
-
 InterfaceScope:
 	{InterfaceScope} 'interface' (name=XID)? ':' (declarations+=InterfaceScopeDeclaration)*;
 
@@ -71,9 +63,6 @@ ImportScope:
 QID:
 	ID ('.' ID)*;
 
-Declaration returns types::Declaration:
-	EventDefinition | VariableDefinition | OperationDefinition | TypeAliasDefinition;
-
 EventDefinition:
 	(direction=Direction)? 'event' name=XID (':' typeSpecifier=TypeSpecifier)?;
 
@@ -101,9 +90,6 @@ TypeSpecifier returns types::TypeSpecifier:
 Parameter returns types::Parameter:
 	 name=XID (varArgs?='...')? ':' typeSpecifier=TypeSpecifier;
 
-Reaction returns sgraph::Reaction:
-	LocalReaction | TransitionReaction;
-
 LocalReaction:
 	(trigger=ReactionTrigger) => ('/' effect=ReactionEffect);