From beefd6cad4cd1ac32f9f6b8c157eef117aa6bcf0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ronny=20B=C3=B6ttger?= <s6013406@mail.zih.tu-dresden.de>
Date: Fri, 5 Nov 2021 05:52:44 +0100
Subject: [PATCH] changed ecore2relast to RoleRag added Example.relast as input
 file

---
 statemachine.solution/build.gradle                    |  8 +++++---
 .../src/main/resources/Example.relast                 | 11 +++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)
 create mode 100644 statemachine.solution/src/main/resources/Example.relast

diff --git a/statemachine.solution/build.gradle b/statemachine.solution/build.gradle
index d2e348f..30f9094 100644
--- a/statemachine.solution/build.gradle
+++ b/statemachine.solution/build.gradle
@@ -42,8 +42,8 @@ run {
 }
 
 // Generated files
-def ecoreFile = "./src/main/resources/StateMachine.ecore"
-def relastFile = "./src/gen/jastadd/StateMachine.relast"
+def ecoreFile = "./src/main/resources/Example.relast"
+def relastFile = "./src/gen/jastadd/Example.relast"
 
 // First phase: Ecore -> RelAst
 task ecoreToRelast(type: JavaExec) {
@@ -56,7 +56,9 @@ task ecoreToRelast(type: JavaExec) {
         mkdir "src/gen/jastadd"
     }
 
-    args "../libs/ecore2relast-0.1.jar", ecoreFile, relastFile
+    //args "../libs/ecore2relast-0.1.jar", ecoreFile, relastFile
+    args "../libs/RoleRag-0.2.0.jar", "--inputBaseDir=C:/Users/Ronny/IdeaProjects/bank/statemachine.solution/src/main/resources",
+            "--outputBaseDir=C:/Users/Ronny/IdeaProjects/bank/statemachine.solution/src/gen/jastadd", "Example.relast"
 
     inputs.files file(ecoreFile)
     outputs.files file(relastFile)
diff --git a/statemachine.solution/src/main/resources/Example.relast b/statemachine.solution/src/main/resources/Example.relast
new file mode 100644
index 0000000..c288fd8
--- /dev/null
+++ b/statemachine.solution/src/main/resources/Example.relast
@@ -0,0 +1,11 @@
+
+
+StateMachine ::= Element*;
+abstract Element ::= <Label:String>;
+State : Element ::=;
+Transition : Element ::=;
+
+rel StateMachine.initial -> State;
+rel StateMachine.final* -> State;
+rel State.outgoing* <-> Transition.from;
+rel State.incoming* <-> Transition.to;
-- 
GitLab