Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-09-14 14:56:57 +0000
committerHenrik Rentz-Reichert2012-09-14 14:56:57 +0000
commite85be57b8fa78975194d380f076585b26e22a991 (patch)
tree87a83a7f69d36122721e567b2f66cbb2a6560e21 /plugins
parentd26072a00a2647cabfcda4dbf78291fb07ec2fdd (diff)
downloadorg.eclipse.etrice-e85be57b8fa78975194d380f076585b26e22a991.tar.gz
org.eclipse.etrice-e85be57b8fa78975194d380f076585b26e22a991.tar.xz
org.eclipse.etrice-e85be57b8fa78975194d380f076585b26e22a991.zip
[runtime.java, generator.java, ui.runtime, tutorials] changed generation of runner class
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend4
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend20
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java4
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java54
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zipbin41268 -> 41268 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zipbin36835 -> 37250 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.zipbin102806 -> 101076 bytes
7 files changed, 21 insertions, 61 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend
index 5ec7ae279..f5489ef7c 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.xtend
@@ -76,8 +76,8 @@ class SubSystemClassGen {
«cc.userCode(2)»
- public «comp.name»(IRTObject parent, String name) {
- super(parent, name);
+ public «comp.name»(String name) {
+ super(name);
}
@Override
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend
index 69dba9085..c0cc6cc1f 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.xtend
@@ -47,27 +47,15 @@ class SubSystemRunnerGen {
class «ssc.name+"Runner"» extends SubSystemRunnerBase {
- static «ssc.name» main_component = new «ssc.name»(null, "«ssc.name»");
-
/**
* main function
- * creates component and starts and stops the lifecycle
+ * creates the main component and starts and stops the lifecycle
*/
public static void main(String[] args) {
-
- System.out.println("*** T H E B E G I N ***");
+ // instantiate the main component
+ «ssc.name» main_component = new «ssc.name»("«ssc.name»");
- main_component.init(); // lifecycle init
- main_component.start(); // lifecycle start
-
- // application runs until quit
- waitForQuit();
-
- // end the lifecycle
- main_component.stop(); // lifecycle stop
- main_component.destroy(); // lifecycle destroy
-
- System.out.println("*** T H E E N D ***");
+ run(main_component, args);
}
};
'''
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java
index 8e14ef1bd..3854a7427 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java
@@ -154,10 +154,10 @@ public class SubSystemClassGen {
_builder.append("public ");
String _name_2 = comp.getName();
_builder.append(_name_2, " ");
- _builder.append("(IRTObject parent, String name) {");
+ _builder.append("(String name) {");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
- _builder.append("super(parent, name);");
+ _builder.append("super(name);");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java
index 99ffe08aa..fd0f3c901 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java
@@ -80,26 +80,13 @@ public class SubSystemRunnerGen {
_builder.newLineIfNotEmpty();
_builder.newLine();
_builder.append("\t");
- _builder.append("static ");
- String _name_3 = ssc.getName();
- _builder.append(_name_3, " ");
- _builder.append(" main_component = new ");
- String _name_4 = ssc.getName();
- _builder.append(_name_4, " ");
- _builder.append("(null, \"");
- String _name_5 = ssc.getName();
- _builder.append(_name_5, " ");
- _builder.append("\");");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
_builder.append("/**");
_builder.newLine();
_builder.append(" ");
_builder.append("* main function");
_builder.newLine();
_builder.append(" ");
- _builder.append("* creates component and starts and stops the lifecycle");
+ _builder.append("* creates the main component and starts and stops the lifecycle");
_builder.newLine();
_builder.append(" ");
_builder.append("*/");
@@ -107,39 +94,24 @@ public class SubSystemRunnerGen {
_builder.append("\t");
_builder.append("public static void main(String[] args) {");
_builder.newLine();
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("System.out.println(\"*** T H E B E G I N ***\");");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("main_component.init(); // lifecycle init");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("main_component.start(); // lifecycle start");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("// application runs until quit ");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("waitForQuit();");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.newLine();
_builder.append("\t\t");
- _builder.append("// end the lifecycle");
+ _builder.append("// instantiate the main component");
_builder.newLine();
_builder.append("\t\t");
- _builder.append("main_component.stop(); // lifecycle stop");
- _builder.newLine();
+ String _name_3 = ssc.getName();
+ _builder.append(_name_3, " ");
+ _builder.append(" main_component = new ");
+ String _name_4 = ssc.getName();
+ _builder.append(_name_4, " ");
+ _builder.append("(\"");
+ String _name_5 = ssc.getName();
+ _builder.append(_name_5, " ");
+ _builder.append("\");");
+ _builder.newLineIfNotEmpty();
_builder.append("\t\t");
- _builder.append("main_component.destroy(); // lifecycle destroy");
- _builder.newLine();
_builder.newLine();
_builder.append("\t\t");
- _builder.append("System.out.println(\"*** T H E E N D ***\");");
+ _builder.append("run(main_component, args);");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
index aecdf03b0..d6f9062ad 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip
index 75a6514dd..a82766b2f 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.zip
index 47fe39c2e..76cdd3445 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.zip
Binary files differ

Back to the top