Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/templates/readme.txt2
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/templates/templates.xml18
-rw-r--r--plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java7
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend6
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend3
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java88
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java17
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java28
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend3
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/.classpath8
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/.gitignore2
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/.project34
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF22
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/build.properties5
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/src/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.xtend170
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/xtend-gen/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.java407
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java12
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeGen.java24
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java20
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java16
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorConfigTab.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java17
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java7
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend1
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingCreationPage.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingWizard.java12
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/SelectRoomPage.java1
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java2
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java12
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java95
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.xtend39
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java116
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.actioneditor/build.properties3
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.fsm/build.properties3
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/build.properties3
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zipbin101844 -> 103380 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zipbin229804 -> 213488 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zipbin176855 -> 176855 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zipbin10594 -> 10601 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zipbin19383 -> 19405 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zipbin29280 -> 17855 bytes
47 files changed, 1013 insertions, 236 deletions
diff --git a/plugins/org.eclipse.etrice.core.room.ui/templates/readme.txt b/plugins/org.eclipse.etrice.core.room.ui/templates/readme.txt
index c2aadb5b2..32395d9ba 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/templates/readme.txt
+++ b/plugins/org.eclipse.etrice.core.room.ui/templates/readme.txt
@@ -1,4 +1,4 @@
-http://www.eclipse.org/Xtext/documentation/latest/xtext.html#templates
+https://eclipse.org/Xtext/documentation/304_ide_concepts.html#templates
However, these templates will not be visible by default. To fix it, you have to manually edit the xml-file and insert an ID attribute for each template element.
diff --git a/plugins/org.eclipse.etrice.core.room.ui/templates/templates.xml b/plugins/org.eclipse.etrice.core.room.ui/templates/templates.xml
index 5eb87cd88..7812a7309 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/templates/templates.xml
+++ b/plugins/org.eclipse.etrice.core.room.ui/templates/templates.xml
@@ -73,7 +73,7 @@ ${cursor}</template>
}&#13;
${cursor}</template>
- <template autoinsert="true" context="org.eclipse.etrice.core.Room.kw_State"
+ <template autoinsert="true" context="org.eclipse.etrice.core.fsm.FSM.kw_State"
deleted="false" description="State with entry code, exit code and sub graph"
enabled="true" id="state" name="State">State ${name} {&#13;
entry {&#13;
@@ -87,7 +87,7 @@ ${cursor}</template>
}
${cursor}</template>
- <template autoinsert="true" context="org.eclipse.etrice.core.Room.DetailCode"
+ <template autoinsert="true" context="org.eclipse.etrice.core.fsm.FSM.DetailCode"
deleted="false" description="detail code" enabled="true" id="detail_code"
name="detail code">{&#13;
"${cursor}"&#13;
@@ -99,7 +99,7 @@ ${cursor}</template>
${cursor}</template>
<template autoinsert="true"
- context="org.eclipse.etrice.core.Room.kw_RefinedState" deleted="false"
+ context="org.eclipse.etrice.core.fsm.FSM.kw_RefinedState" deleted="false"
description="RefinedState" enabled="true" id="refined_state"
name="RefinedState">RefinedState ${base:CrossReference('RefinedState.base')} {&#13;
${cursor}&#13;
@@ -126,4 +126,14 @@ ${cursor}</template>
id="primitiveType" name="PrimitiveType">PrimitiveType ${name} -&gt; ${typeName} (${typeCastName}) default "${defaultValueLiteral}"&#13;
${cursor}</template>
-</templates> \ No newline at end of file
+ <template autoinsert="true"
+ context="org.eclipse.etrice.core.common.Base.kw_@" deleted="false"
+ description="insert DataLogging with Gnuplot" enabled="true" id="annotation_dataLoggingGnuplot"
+ name="DataLogging">@DataLogging(pathlist="/${cursor}fullInstancePath1, /fullInstancePath2")&#13;
+@Gnuplot(format="pngcairo", outputfile="main.data.png", width=1800, height=600, fontsize=10)&#13;
+@GnuplotGraph(&#13;
+ paths="/fullInstancePath",&#13;
+ xtics=100, mxtics=4, ymin=-1.2, ymax=1.2&#13;
+)</template>
+</templates>
+
diff --git a/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
index a34f65ef0..d41a9785d 100644
--- a/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.etrice.core.room.ui;bundle-version="0.5.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.xtend.lib;bundle-version="2.6.0",
org.eclipse.xtext.generator;bundle-version="2.6.0",
- org.eclipse.xtext.util;bundle-version="2.6.0"
+ org.eclipse.xtext.util;bundle-version="2.6.0",
+ org.eclipse.etrice.generator.gnuplot
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.etrice.generator.c
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
index adebaf834..1a023e51c 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
@@ -87,6 +87,9 @@ public class Main extends AbstractGenerator {
protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
@Inject
+ protected org.eclipse.etrice.generator.gnuplot.GnuplotScriptGenerator gnuPlotGenerator;
+
+ @Inject
private Validator validator;
@Inject
@@ -175,6 +178,10 @@ public class Main extends AbstractGenerator {
mainDocGenerator.doGenerate(genModel.eResource());
}
+ if(getSettings().isGenerateDataInstrumentation()){
+ gnuPlotGenerator.doGenerate(genModel);
+ }
+
if (diagnostician.isFailed()) {
logger.logInfo("errors during code generation");
logger.logError("-- terminating", null);
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
index cda386cd2..34c27b984 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
@@ -139,7 +139,7 @@ class NodeGen {
val ssc = ssi.subSystemClass
val clsname = nr.name+"_"+ssi.name
val threads = nr.type.threads.filter(t|usedThreads.contains(t))
- val logData = ssc.annotations.isAnnotationPresent("DataLogging")
+ val logData = Main::settings.generateDataInstrumentation && ssc.annotations.isAnnotationPresent("DataLogging")
'''
/**
* @author generated by eTrice
@@ -651,8 +651,8 @@ class NodeGen {
def private generateDispatcherFile(Root root, SubSystemInstance ssi, Collection<PhysicalThread> usedThreads) {
val nr = ETMapUtil::getNodeRef(ssi)
- val loggedPorts = ssi.loggedPorts
- val logData = ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
+ val logData = Main::settings.generateDataInstrumentation && ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
+ val loggedPorts = if(logData) ssi.loggedPorts else newArrayList
'''
/**
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
index 136f93166..53ac1a14e 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
@@ -21,6 +21,7 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.generic.RoomExtensions
import org.eclipse.etrice.core.etmap.util.ETMapUtil
import org.eclipse.etrice.core.common.base.util.BaseHelpers
+import org.eclipse.etrice.generator.c.Main
@Singleton
class NodeRunnerGen {
@@ -48,7 +49,7 @@ class NodeRunnerGen {
def generateSourceFile(Root root, SubSystemInstance ssi, boolean first) {
val nr = ETMapUtil::getNodeRef(ssi)
val clsname = nr.name+"_"+ssi.name
- val logData = ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
+ val logData = Main.getSettings.isGenerateDataInstrumentation && ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
'''
/**
* @author generated by eTrice
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
index 8292eb5c8..8d9e857dc 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
@@ -209,8 +209,8 @@ public class ActorClassGen extends GenericActorClassGenerator {
_or = true;
} else {
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- _or = _generateMSCInstrumentation;
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ _or = _isGenerateMSCInstrumentation;
}
final boolean hasConstData = _or;
boolean _and_3 = false;
@@ -319,8 +319,8 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.newLineIfNotEmpty();
{
GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t");
_builder.append("const char* instName;");
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
index 9d92297df..0ba79145c 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
@@ -279,8 +279,17 @@ public class NodeGen {
}
};
final Iterable<PhysicalThread> threads = IterableExtensions.<PhysicalThread>filter(_threads, _function);
- EList<Annotation> _annotations = ssc.getAnnotations();
- final boolean logData = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging");
+ boolean _and = false;
+ GlobalGeneratorSettings _settings = Main.getSettings();
+ boolean _isGenerateDataInstrumentation = _settings.isGenerateDataInstrumentation();
+ if (!_isGenerateDataInstrumentation) {
+ _and = false;
+ } else {
+ EList<Annotation> _annotations = ssc.getAnnotations();
+ boolean _isAnnotationPresent = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging");
+ _and = _isAnnotationPresent;
+ }
+ final boolean logData = _and;
StringConcatenation _builder = new StringConcatenation();
_builder.append("/**");
_builder.newLine();
@@ -1225,8 +1234,8 @@ public class NodeGen {
{
boolean _and = false;
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- boolean _not = (!_generateMSCInstrumentation);
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ boolean _not = (!_isGenerateMSCInstrumentation);
if (!_not) {
_and = false;
} else {
@@ -1397,15 +1406,15 @@ public class NodeGen {
_or = true;
} else {
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- _or = _generateMSCInstrumentation;
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ _or = _isGenerateMSCInstrumentation;
}
final boolean haveConstData = _or;
final IntelligentSeparator sep = new IntelligentSeparator(",");
String _xifexpression_1 = null;
GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_xifexpression_1 = "/*const*/";
} else {
_xifexpression_1 = "const";
@@ -1414,8 +1423,8 @@ public class NodeGen {
StringConcatenation _builder = new StringConcatenation();
{
GlobalGeneratorSettings _settings_2 = Main.getSettings();
- boolean _generateMSCInstrumentation_2 = _settings_2.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_2) {
+ boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_2) {
CharSequence _genPeerPortArrays = this.genPeerPortArrays(root, ai);
_builder.append(_genPeerPortArrays, "");
_builder.newLineIfNotEmpty();
@@ -1472,8 +1481,8 @@ public class NodeGen {
_builder.newLineIfNotEmpty();
{
GlobalGeneratorSettings _settings_3 = Main.getSettings();
- boolean _generateMSCInstrumentation_3 = _settings_3.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_3) {
+ boolean _isGenerateMSCInstrumentation_3 = _settings_3.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_3) {
_builder.append("\t");
_builder.append(sep, "\t");
_builder.append("\"");
@@ -1791,8 +1800,8 @@ public class NodeGen {
String myInst = "";
String peerInst = "";
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
EObject _eContainer_1 = pi.eContainer();
String _path = ((ActorInstance) _eContainer_1).getPath();
String _plus = ("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE\n,\"" + _path);
@@ -1870,8 +1879,8 @@ public class NodeGen {
final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(messages, _function_2);
boolean _and = false;
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (!_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (!_isGenerateMSCInstrumentation) {
_and = false;
} else {
boolean _and_1 = false;
@@ -1997,8 +2006,8 @@ public class NodeGen {
final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(sentMsgs, _function_2);
boolean _and = false;
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (!_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (!_isGenerateMSCInstrumentation) {
_and = false;
} else {
boolean _and_1 = false;
@@ -2062,8 +2071,8 @@ public class NodeGen {
String result = "";
String _xifexpression = null;
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
EObject _eContainer = pi.eContainer();
String _path = ((ActorInstance) _eContainer).getPath();
String _plus = ("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE\n,\"" + _path);
@@ -2095,8 +2104,8 @@ public class NodeGen {
String iiiD = this.getInterfaceItemInstanceData(pi);
String _xifexpression_2 = null;
GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
EObject _eContainer_2 = p.eContainer();
String _path_1 = ((ActorInstance) _eContainer_2).getPath();
String _plus_1 = (",\"" + _path_1);
@@ -2144,10 +2153,25 @@ public class NodeGen {
CharSequence _xblockexpression = null;
{
final NodeRef nr = ETMapUtil.getNodeRef(ssi);
- final ArrayList<PortInstance> loggedPorts = this.loggedPorts(ssi);
- SubSystemClass _subSystemClass = ssi.getSubSystemClass();
- EList<Annotation> _annotations = _subSystemClass.getAnnotations();
- final boolean logData = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging");
+ boolean _and = false;
+ GlobalGeneratorSettings _settings = Main.getSettings();
+ boolean _isGenerateDataInstrumentation = _settings.isGenerateDataInstrumentation();
+ if (!_isGenerateDataInstrumentation) {
+ _and = false;
+ } else {
+ SubSystemClass _subSystemClass = ssi.getSubSystemClass();
+ EList<Annotation> _annotations = _subSystemClass.getAnnotations();
+ boolean _isAnnotationPresent = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging");
+ _and = _isAnnotationPresent;
+ }
+ final boolean logData = _and;
+ ArrayList<PortInstance> _xifexpression = null;
+ if (logData) {
+ _xifexpression = this.loggedPorts(ssi);
+ } else {
+ _xifexpression = CollectionLiterals.<PortInstance>newArrayList();
+ }
+ final ArrayList<PortInstance> loggedPorts = _xifexpression;
StringConcatenation _builder = new StringConcatenation();
_builder.append("/**");
_builder.newLine();
@@ -2542,9 +2566,9 @@ public class NodeGen {
_builder.newLine();
} else {
{
- GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ GlobalGeneratorSettings _settings_1 = Main.getSettings();
+ boolean _isGenerateMSCInstrumentation = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("\t\t");
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_ASYNC_IN(");
@@ -2725,9 +2749,9 @@ public class NodeGen {
_builder.newLine();
} else {
{
- GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ GlobalGeneratorSettings _settings_2 = Main.getSettings();
+ boolean _isGenerateMSCInstrumentation_1 = _settings_2.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t\t");
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_ASYNC_IN(");
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java
index 6fdd95b78..47fd4d7be 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java
@@ -25,6 +25,8 @@ import org.eclipse.etrice.core.genmodel.etricegen.Root;
import org.eclipse.etrice.core.genmodel.etricegen.StructureInstance;
import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance;
import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.generator.base.GlobalGeneratorSettings;
+import org.eclipse.etrice.generator.c.Main;
import org.eclipse.etrice.generator.c.gen.CExtensions;
import org.eclipse.etrice.generator.generic.RoomExtensions;
import org.eclipse.xtend2.lib.StringConcatenation;
@@ -88,9 +90,18 @@ public class NodeRunnerGen {
String _plus = (_name + "_");
String _name_1 = ssi.getName();
final String clsname = (_plus + _name_1);
- SubSystemClass _subSystemClass = ssi.getSubSystemClass();
- EList<Annotation> _annotations = _subSystemClass.getAnnotations();
- final boolean logData = this._baseHelpers.isAnnotationPresent(_annotations, "DataLogging");
+ boolean _and = false;
+ GlobalGeneratorSettings _settings = Main.getSettings();
+ boolean _isGenerateDataInstrumentation = _settings.isGenerateDataInstrumentation();
+ if (!_isGenerateDataInstrumentation) {
+ _and = false;
+ } else {
+ SubSystemClass _subSystemClass = ssi.getSubSystemClass();
+ EList<Annotation> _annotations = _subSystemClass.getAnnotations();
+ boolean _isAnnotationPresent = this._baseHelpers.isAnnotationPresent(_annotations, "DataLogging");
+ _and = _isAnnotationPresent;
+ }
+ final boolean logData = _and;
StringConcatenation _builder = new StringConcatenation();
_builder.append("/**");
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java
index a4179c5b2..b138e26bb 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java
@@ -202,8 +202,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
{
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("/*--------------------- debug helpers */");
_builder.newLine();
_builder.newLine();
@@ -440,8 +440,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
{
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("/*--------------------- debug helpers */");
_builder.newLine();
CharSequence _generateDebugHelpersImplementation = this.generateDebugHelpersImplementation(root, pc);
@@ -687,8 +687,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(sentMsgs, _function_2);
boolean _and = false;
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (!_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (!_isGenerateMSCInstrumentation) {
_and = false;
} else {
boolean _and_1 = false;
@@ -960,8 +960,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(messages, _function_2);
boolean _and = false;
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (!_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (!_isGenerateMSCInstrumentation) {
_and = false;
} else {
boolean _and_1 = false;
@@ -1313,8 +1313,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLineIfNotEmpty();
{
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("\t");
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, \"");
@@ -1385,8 +1385,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLineIfNotEmpty();
{
GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t");
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, \"");
@@ -1447,8 +1447,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLineIfNotEmpty();
{
GlobalGeneratorSettings _settings_2 = Main.getSettings();
- boolean _generateMSCInstrumentation_2 = _settings_2.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_2) {
+ boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_2) {
_builder.append("\t");
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, \"");
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java
index b718ffd4e..bb1ee4fef 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java
@@ -124,8 +124,8 @@ public class StateMachineGen extends GenericStateMachineGenerator {
StringConcatenation _builder = new StringConcatenation();
{
GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("/* state names */");
_builder.newLine();
_builder.append("static char* stateStrings[] = {\"<no state>\",\"<top>\",");
@@ -164,8 +164,8 @@ public class StateMachineGen extends GenericStateMachineGenerator {
_builder.newLine();
{
GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_CHANGE_STATE(self->constData->instName, stateStrings[new_state])");
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
index 6927bb434..89823b7fe 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
@@ -16,11 +16,10 @@ import com.google.inject.Inject
import com.google.inject.Singleton
import java.util.ArrayList
import org.eclipse.etrice.core.fsm.fSM.ComponentCommunicationType
-import org.eclipse.etrice.core.genmodel.fsm.base.ILogger
import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass
import org.eclipse.etrice.core.genmodel.etricegen.Root
+import org.eclipse.etrice.core.genmodel.fsm.base.ILogger
import org.eclipse.etrice.core.room.ActorClass
-import org.eclipse.etrice.generator.base.AbstractGenerator
import org.eclipse.etrice.generator.cpp.Main
import org.eclipse.etrice.generator.generic.GenericActorClassGenerator
import org.eclipse.etrice.generator.generic.ProcedureHelpers
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/.classpath b/plugins/org.eclipse.etrice.generator.gnuplot/.classpath
new file mode 100644
index 000000000..5cef82c24
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/.gitignore b/plugins/org.eclipse.etrice.generator.gnuplot/.gitignore
new file mode 100644
index 000000000..65847a73f
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/.gitignore
@@ -0,0 +1,2 @@
+bin
+*._trace
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/.project b/plugins/org.eclipse.etrice.generator.gnuplot/.project
new file mode 100644
index 000000000..69d0f9b43
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.generator.gnuplot</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..7a7ab3463
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.xtend=UTF-8
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..c537b6306
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..c6b605017
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Gnuplot generator
+Bundle-SymbolicName: org.eclipse.etrice.generator.gnuplot
+Bundle-Version: 1.0.0.qualifier
+Export-Package: org.eclipse.etrice.generator.gnuplot
+Require-Bundle: org.eclipse.xtext;bundle-version="2.6.0",
+ org.eclipse.xtend.lib;bundle-version="2.6.0",
+ org.eclipse.etrice.generator;bundle-version="0.5.0",
+ org.eclipse.etrice.generator.fsm;bundle-version="0.5.0",
+ org.eclipse.etrice.core.room;bundle-version="0.5.0",
+ org.eclipse.etrice.core.genmodel;bundle-version="0.5.0",
+ org.eclipse.etrice.core.etphys;bundle-version="0.5.0",
+ org.eclipse.etrice.generator.config;bundle-version="0.5.0",
+ org.eclipse.etrice.generator.java;bundle-version="0.5.0",
+ org.eclipse.etrice.core.config;bundle-version="0.5.0",
+ org.eclipse.etrice.core.etmap;bundle-version="0.5.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.eclipse.etrice.generator.doc;bundle-version="0.5.0",
+ org.eclipse.etrice.abstractexec.behavior;bundle-version="0.5.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/build.properties b/plugins/org.eclipse.etrice.generator.gnuplot/build.properties
new file mode 100644
index 000000000..c3d5e96b2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/build.properties
@@ -0,0 +1,5 @@
+source.. = src/,\
+ xtend-gen/
+bin.includes = META-INF/,\
+ .
+
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/src/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.xtend b/plugins/org.eclipse.etrice.generator.gnuplot/src/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.xtend
new file mode 100644
index 000000000..d6cfafe09
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/src/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.xtend
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Eyrak Pean (initial contribution)
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.gnuplot
+
+import com.google.inject.Inject
+import org.eclipse.etrice.core.common.base.Annotation
+import org.eclipse.etrice.core.common.base.IntLiteral
+import org.eclipse.etrice.core.common.base.KeyValue
+import org.eclipse.etrice.core.common.base.RealLiteral
+import org.eclipse.etrice.core.common.base.StringLiteral
+import org.eclipse.etrice.core.genmodel.etricegen.Root
+import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance
+import org.eclipse.etrice.generator.fsm.base.IGeneratorFileIo
+import org.eclipse.etrice.generator.generic.RoomExtensions
+
+class GnuplotScriptGenerator {
+ @Inject
+ IGeneratorFileIo fileIo
+
+ @Inject
+ extension RoomExtensions roomExtensions
+
+ def doGenerate(Root root) {
+ if (root.subSystemInstances.empty)
+ return;
+
+ // TODO: warning more than one ssi
+ val ssi = root.subSystemInstances.head
+ val path = ssi.subSystemClass.getGenerationTargetPath
+ val infoPath = ssi.subSystemClass.generationInfoPath
+ try {
+ fileIo.generateFile("Generating gnuplot script for subsystem " + ssi.name, path, infoPath,
+ "/gnuplot/log_main.data.csv-Script.plt", ssi.generatePlotScript)
+ fileIo.generateFile("Generating gnuplot launch configuration", path, infoPath,
+ "/gnuplot/create_gnuplot.launch", gnuPlotLaunchFile)
+ } catch (Exception e) {
+ //e.printStackTrace
+ }
+
+ }
+
+ def protected gnuPlotLaunchFile() '''
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+ <launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${system_path:gnuplot}"/>
+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="${project_loc}/src-gen/gnuplot/log_main.data.csv-Script.plt"/>
+ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/>
+ </launchConfiguration>
+
+ '''
+
+ def protected getAttribute(Annotation anno, String name) {
+ anno.attributes.findFirst[attr|attr.key == name]
+ }
+
+ def protected asString(KeyValue kv) {
+ if (kv.value instanceof StringLiteral)
+ (kv.value as StringLiteral).value
+ else
+ null
+ }
+
+ def protected asReal(KeyValue kv) {
+ if (kv.value instanceof RealLiteral)
+ (kv.value as RealLiteral).value
+ else if (kv.value instanceof IntLiteral)
+ (kv.value as IntLiteral).value as double
+ else
+ null
+ }
+
+ def protected asInteger(KeyValue kv) {
+ if (kv.value instanceof IntLiteral)
+ (kv.value as IntLiteral).value
+ else
+ null
+ }
+
+ def protected generatePlotScript(SubSystemInstance ssi) {
+
+ // TODO: warn if more than one GnuPlot annotation
+ val plotAnnotation = ssi.subSystemClass.annotations.filter [ a |
+ a.type.name == "Gnuplot"
+ ].head
+
+ val defaultFontsize = 10
+
+ // TODO: error checking
+ val format = plotAnnotation?.getAttribute("format")?.asString
+ val outputfile = plotAnnotation?.getAttribute("outputfile")?.asString
+ val width = plotAnnotation?.getAttribute("width")?.asInteger
+ val height = plotAnnotation?.getAttribute("height")?.asInteger
+ val fontsize = plotAnnotation?.getAttribute("fontsize")?.asInteger ?: defaultFontsize
+
+ val graphAnnotations = ssi.subSystemClass.annotations.filter [ a |
+ a.type.name == "GnuplotGraph"
+ ].toList
+
+ '''
+ #!/gnuplot
+
+ # Color Brewer set1 5-set
+ set linetype 1 lc rgb '#e41a1c' lw 1
+ set linetype 2 lc rgb '#377eb8' lw 1
+ set linetype 3 lc rgb '#4daf4a' lw 1
+ set linetype 4 lc rgb '#984ea3' lw 1
+ set linetype 5 lc rgb '#ff7f00' lw 1
+ set linetype cycle 5
+
+ cd 'log'
+ set datafile separator comma
+ set terminal «format» size «width»,«height» font ",«fontsize»" background "white"
+ set output '«outputfile»'
+ set size 1,1
+ set multiplot layout «graphAnnotations.size»,1
+ set grid
+ show grid
+ set format y "% 5.3f"
+ «var i = 0»
+ «FOR a : graphAnnotations»
+
+ «ssi.generateGraph(a, i++, graphAnnotations.size)»
+ «ENDFOR»
+
+ unset multiplot
+ unset output
+
+ '''
+ }
+
+ def protected generateGraph(SubSystemInstance ssi, Annotation graph, int index, int total) {
+
+ // TODO: handle multiple paths in the same graph
+ val paths = graph.getAttribute("paths")?.asString
+
+ // TODO: take interval from physical thread associated with actor instance instead of annotation attribute
+ val interval = graph.getAttribute("interval")?.asInteger ?: 20
+ val xtics = graph.getAttribute("xtics")?.asReal ?: 100
+ val mxtics = graph.getAttribute("mxtics")?.asInteger ?: 4
+ val ymin = graph.getAttribute("ymin")?.asReal
+ val ymax = graph.getAttribute("ymax")?.asReal
+
+ val vertOrigin = ((total - (index + 1)) as double) / total
+ val vertSize = 1.0F / total
+
+ '''
+ set yrange [«ymin ?: "*"» : «ymax ?: "*"»]
+ set xtics rotate «xtics»
+ set mxtics «mxtics»
+ set ylabel
+ set xlabel "time (ms)"
+ timeInMs(x) = «interval» * x
+ set origin 0,«vertOrigin»
+ set size 1,«vertSize»
+ plot 'main.data.csv' using (timeInMs(column(1))):(column("«paths»")) with lines
+ '''
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.gnuplot/xtend-gen/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.java b/plugins/org.eclipse.etrice.generator.gnuplot/xtend-gen/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.java
new file mode 100644
index 000000000..c0e4cf035
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.gnuplot/xtend-gen/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.java
@@ -0,0 +1,407 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Eyrak Pean (initial contribution)
+ * Juergen Haug
+ */
+package org.eclipse.etrice.generator.gnuplot;
+
+import com.google.common.base.Objects;
+import com.google.inject.Inject;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.core.common.base.Annotation;
+import org.eclipse.etrice.core.common.base.AnnotationType;
+import org.eclipse.etrice.core.common.base.IntLiteral;
+import org.eclipse.etrice.core.common.base.KeyValue;
+import org.eclipse.etrice.core.common.base.Literal;
+import org.eclipse.etrice.core.common.base.RealLiteral;
+import org.eclipse.etrice.core.common.base.StringLiteral;
+import org.eclipse.etrice.core.genmodel.etricegen.Root;
+import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance;
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.generator.fsm.base.IGeneratorFileIo;
+import org.eclipse.etrice.generator.generic.RoomExtensions;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.Exceptions;
+import org.eclipse.xtext.xbase.lib.Extension;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+
+@SuppressWarnings("all")
+public class GnuplotScriptGenerator {
+ @Inject
+ private IGeneratorFileIo fileIo;
+
+ @Inject
+ @Extension
+ private RoomExtensions roomExtensions;
+
+ public void doGenerate(final Root root) {
+ EList<SubSystemInstance> _subSystemInstances = root.getSubSystemInstances();
+ boolean _isEmpty = _subSystemInstances.isEmpty();
+ if (_isEmpty) {
+ return;
+ }
+ EList<SubSystemInstance> _subSystemInstances_1 = root.getSubSystemInstances();
+ final SubSystemInstance ssi = IterableExtensions.<SubSystemInstance>head(_subSystemInstances_1);
+ SubSystemClass _subSystemClass = ssi.getSubSystemClass();
+ final String path = this.roomExtensions.getGenerationTargetPath(_subSystemClass);
+ SubSystemClass _subSystemClass_1 = ssi.getSubSystemClass();
+ final String infoPath = this.roomExtensions.getGenerationInfoPath(_subSystemClass_1);
+ try {
+ String _name = ssi.getName();
+ String _plus = ("Generating gnuplot script for subsystem " + _name);
+ CharSequence _generatePlotScript = this.generatePlotScript(ssi);
+ this.fileIo.generateFile(_plus, path, infoPath,
+ "/gnuplot/log_main.data.csv-Script.plt", _generatePlotScript);
+ CharSequence _gnuPlotLaunchFile = this.gnuPlotLaunchFile();
+ this.fileIo.generateFile("Generating gnuplot launch configuration", path, infoPath,
+ "/gnuplot/create_gnuplot.launch", _gnuPlotLaunchFile);
+ } catch (final Throwable _t) {
+ if (_t instanceof Exception) {
+ final Exception e = (Exception)_t;
+ } else {
+ throw Exceptions.sneakyThrow(_t);
+ }
+ }
+ }
+
+ protected CharSequence gnuPlotLaunchFile() {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>");
+ _builder.newLine();
+ _builder.append("<launchConfiguration type=\"org.eclipse.ui.externaltools.ProgramLaunchConfigurationType\">");
+ _builder.newLine();
+ _builder.append("<stringAttribute key=\"org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE\" value=\"${none}\"/>");
+ _builder.newLine();
+ _builder.append("<stringAttribute key=\"org.eclipse.ui.externaltools.ATTR_LOCATION\" value=\"${system_path:gnuplot}\"/>");
+ _builder.newLine();
+ _builder.append("<stringAttribute key=\"org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS\" value=\"${project_loc}/src-gen/gnuplot/log_main.data.csv-Script.plt\"/>");
+ _builder.newLine();
+ _builder.append("<stringAttribute key=\"org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY\" value=\"${project_loc}\"/>");
+ _builder.newLine();
+ _builder.append("</launchConfiguration>");
+ _builder.newLine();
+ _builder.newLine();
+ return _builder;
+ }
+
+ protected KeyValue getAttribute(final Annotation anno, final String name) {
+ EList<KeyValue> _attributes = anno.getAttributes();
+ final Function1<KeyValue, Boolean> _function = new Function1<KeyValue, Boolean>() {
+ public Boolean apply(final KeyValue attr) {
+ String _key = attr.getKey();
+ return Boolean.valueOf(Objects.equal(_key, name));
+ }
+ };
+ return IterableExtensions.<KeyValue>findFirst(_attributes, _function);
+ }
+
+ protected String asString(final KeyValue kv) {
+ String _xifexpression = null;
+ Literal _value = kv.getValue();
+ if ((_value instanceof StringLiteral)) {
+ Literal _value_1 = kv.getValue();
+ _xifexpression = ((StringLiteral) _value_1).getValue();
+ } else {
+ _xifexpression = null;
+ }
+ return _xifexpression;
+ }
+
+ protected Double asReal(final KeyValue kv) {
+ Double _xifexpression = null;
+ Literal _value = kv.getValue();
+ if ((_value instanceof RealLiteral)) {
+ Literal _value_1 = kv.getValue();
+ _xifexpression = Double.valueOf(((RealLiteral) _value_1).getValue());
+ } else {
+ Double _xifexpression_1 = null;
+ Literal _value_2 = kv.getValue();
+ if ((_value_2 instanceof IntLiteral)) {
+ Literal _value_3 = kv.getValue();
+ long _value_4 = ((IntLiteral) _value_3).getValue();
+ _xifexpression_1 = Double.valueOf(((double) _value_4));
+ } else {
+ _xifexpression_1 = null;
+ }
+ _xifexpression = _xifexpression_1;
+ }
+ return _xifexpression;
+ }
+
+ protected Long asInteger(final KeyValue kv) {
+ Long _xifexpression = null;
+ Literal _value = kv.getValue();
+ if ((_value instanceof IntLiteral)) {
+ Literal _value_1 = kv.getValue();
+ _xifexpression = Long.valueOf(((IntLiteral) _value_1).getValue());
+ } else {
+ _xifexpression = null;
+ }
+ return _xifexpression;
+ }
+
+ protected CharSequence generatePlotScript(final SubSystemInstance ssi) {
+ CharSequence _xblockexpression = null;
+ {
+ SubSystemClass _subSystemClass = ssi.getSubSystemClass();
+ EList<Annotation> _annotations = _subSystemClass.getAnnotations();
+ final Function1<Annotation, Boolean> _function = new Function1<Annotation, Boolean>() {
+ public Boolean apply(final Annotation a) {
+ AnnotationType _type = a.getType();
+ String _name = _type.getName();
+ return Boolean.valueOf(Objects.equal(_name, "Gnuplot"));
+ }
+ };
+ Iterable<Annotation> _filter = IterableExtensions.<Annotation>filter(_annotations, _function);
+ final Annotation plotAnnotation = IterableExtensions.<Annotation>head(_filter);
+ final int defaultFontsize = 10;
+ KeyValue _attribute = null;
+ if (plotAnnotation!=null) {
+ _attribute=this.getAttribute(plotAnnotation, "format");
+ }
+ String _asString = null;
+ if (_attribute!=null) {
+ _asString=this.asString(_attribute);
+ }
+ final String format = _asString;
+ KeyValue _attribute_1 = null;
+ if (plotAnnotation!=null) {
+ _attribute_1=this.getAttribute(plotAnnotation, "outputfile");
+ }
+ String _asString_1 = null;
+ if (_attribute_1!=null) {
+ _asString_1=this.asString(_attribute_1);
+ }
+ final String outputfile = _asString_1;
+ KeyValue _attribute_2 = null;
+ if (plotAnnotation!=null) {
+ _attribute_2=this.getAttribute(plotAnnotation, "width");
+ }
+ Long _asInteger = null;
+ if (_attribute_2!=null) {
+ _asInteger=this.asInteger(_attribute_2);
+ }
+ final Long width = _asInteger;
+ KeyValue _attribute_3 = null;
+ if (plotAnnotation!=null) {
+ _attribute_3=this.getAttribute(plotAnnotation, "height");
+ }
+ Long _asInteger_1 = null;
+ if (_attribute_3!=null) {
+ _asInteger_1=this.asInteger(_attribute_3);
+ }
+ final Long height = _asInteger_1;
+ Number _elvis = null;
+ KeyValue _attribute_4 = null;
+ if (plotAnnotation!=null) {
+ _attribute_4=this.getAttribute(plotAnnotation, "fontsize");
+ }
+ Long _asInteger_2 = null;
+ if (_attribute_4!=null) {
+ _asInteger_2=this.asInteger(_attribute_4);
+ }
+ if (_asInteger_2 != null) {
+ _elvis = _asInteger_2;
+ } else {
+ _elvis = Integer.valueOf(defaultFontsize);
+ }
+ final Number fontsize = ((Number)_elvis);
+ SubSystemClass _subSystemClass_1 = ssi.getSubSystemClass();
+ EList<Annotation> _annotations_1 = _subSystemClass_1.getAnnotations();
+ final Function1<Annotation, Boolean> _function_1 = new Function1<Annotation, Boolean>() {
+ public Boolean apply(final Annotation a) {
+ AnnotationType _type = a.getType();
+ String _name = _type.getName();
+ return Boolean.valueOf(Objects.equal(_name, "GnuplotGraph"));
+ }
+ };
+ Iterable<Annotation> _filter_1 = IterableExtensions.<Annotation>filter(_annotations_1, _function_1);
+ final List<Annotation> graphAnnotations = IterableExtensions.<Annotation>toList(_filter_1);
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("#!/gnuplot");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("# Color Brewer set1 5-set");
+ _builder.newLine();
+ _builder.append("set linetype 1 lc rgb \'#e41a1c\' lw 1");
+ _builder.newLine();
+ _builder.append("set linetype 2 lc rgb \'#377eb8\' lw 1");
+ _builder.newLine();
+ _builder.append("set linetype 3 lc rgb \'#4daf4a\' lw 1");
+ _builder.newLine();
+ _builder.append("set linetype 4 lc rgb \'#984ea3\' lw 1");
+ _builder.newLine();
+ _builder.append("set linetype 5 lc rgb \'#ff7f00\' lw 1");
+ _builder.newLine();
+ _builder.append("set linetype cycle 5");
+ _builder.newLine();
+ _builder.newLine();
+ _builder.append("cd \'log\'");
+ _builder.newLine();
+ _builder.append("set datafile separator comma");
+ _builder.newLine();
+ _builder.append("set terminal ");
+ _builder.append(format, "");
+ _builder.append(" size ");
+ _builder.append(width, "");
+ _builder.append(",");
+ _builder.append(height, "");
+ _builder.append(" font \",");
+ _builder.append(((Number)fontsize), "");
+ _builder.append("\" background \"white\"");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set output \'");
+ _builder.append(outputfile, "");
+ _builder.append("\'");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set size 1,1");
+ _builder.newLine();
+ _builder.append("set multiplot layout ");
+ int _size = graphAnnotations.size();
+ _builder.append(_size, "");
+ _builder.append(",1");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set grid");
+ _builder.newLine();
+ _builder.append("show grid");
+ _builder.newLine();
+ _builder.append("set format y \"% 5.3f\"");
+ _builder.newLine();
+ int i = 0;
+ _builder.newLineIfNotEmpty();
+ {
+ for(final Annotation a : graphAnnotations) {
+ _builder.newLine();
+ int _plusPlus = i++;
+ int _size_1 = graphAnnotations.size();
+ CharSequence _generateGraph = this.generateGraph(ssi, a, _plusPlus, _size_1);
+ _builder.append(_generateGraph, "");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ _builder.newLine();
+ _builder.append("unset multiplot");
+ _builder.newLine();
+ _builder.append("unset output");
+ _builder.newLine();
+ _builder.newLine();
+ _xblockexpression = _builder;
+ }
+ return _xblockexpression;
+ }
+
+ protected CharSequence generateGraph(final SubSystemInstance ssi, final Annotation graph, final int index, final int total) {
+ CharSequence _xblockexpression = null;
+ {
+ KeyValue _attribute = this.getAttribute(graph, "paths");
+ String _asString = null;
+ if (_attribute!=null) {
+ _asString=this.asString(_attribute);
+ }
+ final String paths = _asString;
+ Number _elvis = null;
+ KeyValue _attribute_1 = this.getAttribute(graph, "interval");
+ Long _asInteger = null;
+ if (_attribute_1!=null) {
+ _asInteger=this.asInteger(_attribute_1);
+ }
+ if (_asInteger != null) {
+ _elvis = _asInteger;
+ } else {
+ _elvis = Integer.valueOf(20);
+ }
+ final Number interval = ((Number)_elvis);
+ Number _elvis_1 = null;
+ KeyValue _attribute_2 = this.getAttribute(graph, "xtics");
+ Double _asReal = null;
+ if (_attribute_2!=null) {
+ _asReal=this.asReal(_attribute_2);
+ }
+ if (_asReal != null) {
+ _elvis_1 = _asReal;
+ } else {
+ _elvis_1 = Integer.valueOf(100);
+ }
+ final Number xtics = ((Number)_elvis_1);
+ Number _elvis_2 = null;
+ KeyValue _attribute_3 = this.getAttribute(graph, "mxtics");
+ Long _asInteger_1 = null;
+ if (_attribute_3!=null) {
+ _asInteger_1=this.asInteger(_attribute_3);
+ }
+ if (_asInteger_1 != null) {
+ _elvis_2 = _asInteger_1;
+ } else {
+ _elvis_2 = Integer.valueOf(4);
+ }
+ final Number mxtics = ((Number)_elvis_2);
+ KeyValue _attribute_4 = this.getAttribute(graph, "ymin");
+ Double _asReal_1 = null;
+ if (_attribute_4!=null) {
+ _asReal_1=this.asReal(_attribute_4);
+ }
+ final Double ymin = _asReal_1;
+ KeyValue _attribute_5 = this.getAttribute(graph, "ymax");
+ Double _asReal_2 = null;
+ if (_attribute_5!=null) {
+ _asReal_2=this.asReal(_attribute_5);
+ }
+ final Double ymax = _asReal_2;
+ final double vertOrigin = (((double) (total - (index + 1))) / total);
+ final float vertSize = (1.0F / total);
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("set yrange [");
+ Object _elvis_3 = null;
+ if (ymin != null) {
+ _elvis_3 = ymin;
+ } else {
+ _elvis_3 = "*";
+ }
+ _builder.append(((Object)_elvis_3), "");
+ _builder.append(" : ");
+ Object _elvis_4 = null;
+ if (ymax != null) {
+ _elvis_4 = ymax;
+ } else {
+ _elvis_4 = "*";
+ }
+ _builder.append(((Object)_elvis_4), "");
+ _builder.append("]");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set xtics rotate ");
+ _builder.append(((Number)xtics), "");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set mxtics ");
+ _builder.append(((Number)mxtics), "");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set ylabel");
+ _builder.newLine();
+ _builder.append("set xlabel \"time (ms)\"");
+ _builder.newLine();
+ _builder.append("timeInMs(x) = ");
+ _builder.append(((Number)interval), "");
+ _builder.append(" * x");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set origin 0,");
+ _builder.append(vertOrigin, "");
+ _builder.newLineIfNotEmpty();
+ _builder.append("set size 1,");
+ _builder.append(vertSize, "");
+ _builder.newLineIfNotEmpty();
+ _builder.append("plot \'main.data.csv\' using (timeInMs(column(1))):(column(\"");
+ _builder.append(paths, "");
+ _builder.append("\")) with lines");
+ _builder.newLineIfNotEmpty();
+ _xblockexpression = _builder;
+ }
+ return _xblockexpression;
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java
index 1a92addc9..4337138b5 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java
@@ -656,8 +656,8 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.newLineIfNotEmpty();
{
GlobalSettings _settings_4 = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings_4.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings_4.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("\t\t");
_builder.append("\t");
_builder.append("DebuggingService.getInstance().addMessageActorCreate(this, \"");
@@ -686,8 +686,8 @@ public class ActorClassGen extends GenericActorClassGenerator {
} else {
{
GlobalSettings _settings_5 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_5.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_5.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t\t");
_builder.append("DebuggingService.getInstance().addMessageActorCreate(this, \"");
String _name_26 = sub_2.getName();
@@ -930,8 +930,8 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.newLine();
{
GlobalSettings _settings_6 = Main.getSettings();
- boolean _generateMSCInstrumentation_2 = _settings_6.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_2) {
+ boolean _isGenerateMSCInstrumentation_2 = _settings_6.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_2) {
_builder.append("\t");
_builder.append("\t");
_builder.append("DebuggingService.getInstance().addMessageActorDestroy(this);");
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeGen.java
index 5947a9cda..b1c0871e0 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeGen.java
@@ -229,8 +229,8 @@ public class NodeGen {
_builder.newLine();
{
GlobalSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("import org.eclipse.etrice.runtime.java.debugging.DebuggingService;");
_builder.newLine();
}
@@ -453,8 +453,8 @@ public class NodeGen {
_builder.newLineIfNotEmpty();
{
GlobalSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t\t");
_builder.append("\t");
_builder.append("DebuggingService.getInstance().addMessageActorCreate(this, \"");
@@ -481,8 +481,8 @@ public class NodeGen {
} else {
{
GlobalSettings _settings_2 = Main.getSettings();
- boolean _generateMSCInstrumentation_2 = _settings_2.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_2) {
+ boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_2) {
_builder.append("\t\t");
_builder.append("DebuggingService.getInstance().addMessageActorCreate(this, \"");
String _name_8 = sub.getName();
@@ -660,8 +660,8 @@ public class NodeGen {
_builder.newLine();
{
GlobalSettings _settings_3 = Main.getSettings();
- boolean _generateMSCInstrumentation_3 = _settings_3.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_3) {
+ boolean _isGenerateMSCInstrumentation_3 = _settings_3.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_3) {
_builder.append("\t\t");
_builder.append("DebuggingService.getInstance().addVisibleComment(\"begin sub system initialization\");");
_builder.newLine();
@@ -690,8 +690,8 @@ public class NodeGen {
}
{
GlobalSettings _settings_4 = Main.getSettings();
- boolean _generateMSCInstrumentation_4 = _settings_4.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_4) {
+ boolean _isGenerateMSCInstrumentation_4 = _settings_4.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_4) {
_builder.append("\t\t");
_builder.append("DebuggingService.getInstance().addVisibleComment(\"done sub system initialization\");");
_builder.newLine();
@@ -724,8 +724,8 @@ public class NodeGen {
_builder.newLine();
{
GlobalSettings _settings_5 = Main.getSettings();
- boolean _generateMSCInstrumentation_5 = _settings_5.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_5) {
+ boolean _isGenerateMSCInstrumentation_5 = _settings_5.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_5) {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java
index 59db7ab1e..6915c618b 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java
@@ -93,8 +93,8 @@ public class OptionalActorInterfaceGen extends GenericActorClassGenerator {
_builder.newLine();
{
GlobalSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("import org.eclipse.etrice.runtime.java.debugging.DebuggingService;");
_builder.newLine();
}
@@ -194,8 +194,8 @@ public class OptionalActorInterfaceGen extends GenericActorClassGenerator {
_builder.newLine();
{
GlobalSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
index 90f38fa4f..cf2893be6 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
@@ -153,8 +153,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
{
GlobalSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("import org.eclipse.etrice.runtime.java.debugging.DebuggingService;");
_builder.newLine();
}
@@ -319,8 +319,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
}
{
GlobalSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("\t\t");
_builder.append("DebuggingService.getInstance().addPortInstance(this);");
_builder.newLine();
@@ -331,8 +331,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
{
GlobalSettings _settings_1 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
@@ -372,8 +372,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
{
GlobalSettings _settings_2 = Main.getSettings();
- boolean _generateMSCInstrumentation_2 = _settings_2.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_2) {
+ boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_2) {
_builder.append("\t\t\t");
_builder.append("DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);");
_builder.newLine();
@@ -743,8 +743,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
} else {
{
GlobalSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_builder.append("\t");
_builder.append("DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[");
_builder.append(dir, "\t");
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java
index b0d8cfacc..28ca43689 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java
@@ -45,13 +45,13 @@ public class StateMachineGen extends GenericStateMachineGenerator {
{
boolean _or = false;
GlobalSettings _settings = Main.getSettings();
- boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation();
- if (_generateMSCInstrumentation) {
+ boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation) {
_or = true;
} else {
GlobalSettings _settings_1 = Main.getSettings();
- boolean _generateWithVerboseOutput = _settings_1.generateWithVerboseOutput();
- _or = _generateWithVerboseOutput;
+ boolean _isGenerateWithVerboseOutput = _settings_1.isGenerateWithVerboseOutput();
+ _or = _isGenerateWithVerboseOutput;
}
if (_or) {
_builder.append("// state names");
@@ -101,8 +101,8 @@ public class StateMachineGen extends GenericStateMachineGenerator {
_builder.newLine();
{
GlobalSettings _settings_2 = Main.getSettings();
- boolean _generateMSCInstrumentation_1 = _settings_2.generateMSCInstrumentation();
- if (_generateMSCInstrumentation_1) {
+ boolean _isGenerateMSCInstrumentation_1 = _settings_2.isGenerateMSCInstrumentation();
+ if (_isGenerateMSCInstrumentation_1) {
_builder.append("\t");
_builder.append("DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);");
_builder.newLine();
@@ -110,8 +110,8 @@ public class StateMachineGen extends GenericStateMachineGenerator {
}
{
GlobalSettings _settings_3 = Main.getSettings();
- boolean _generateWithVerboseOutput_1 = _settings_3.generateWithVerboseOutput();
- if (_generateWithVerboseOutput_1) {
+ boolean _isGenerateWithVerboseOutput_1 = _settings_3.isGenerateWithVerboseOutput();
+ if (_isGenerateWithVerboseOutput_1) {
_builder.append("\t");
_builder.append("if (stateStrings[new_state]!=\"Idle\") {");
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorConfigTab.java b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorConfigTab.java
index 818fcb6e4..315211c0f 100644
--- a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorConfigTab.java
+++ b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorConfigTab.java
@@ -56,6 +56,8 @@ public class JavaGeneratorConfigTab extends GeneratorConfigTab {
genDataObj = createCheckButton(mainComposite, "generate store to/from POJO data objects");
genDataObj.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
genDataObj.addSelectionListener(new UpdateConfig());
+
+ dataButton.setEnabled(false);
}
/* (non-Javadoc)
diff --git a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java
index b8336ff64..fe1d38b51 100644
--- a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java
+++ b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java
@@ -69,7 +69,8 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
public static final String SAVE_GEN_MODEL = "SaveGenModel";
public static final String LIB = "Lib";
public static final String DEBUG = "Debug";
- public static final String MSC = "MSC";
+ public static final String MSC_INSTR = "MSC";
+ public static final String DATA_INSTR = "DataLogging";
public static final String VERBOSE = "Verbose";
public static final String USE_TRAANSLATION = "UseTranslation";
public static final String OVERRIDE_DIRECTORIES = "OverrideDirectories";
@@ -90,6 +91,7 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
private Text srcgenPath;
private Text infoPath;
private Text docPath;
+ protected Button dataButton;
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
@@ -157,9 +159,13 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
debugButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
debugButton.addSelectionListener(new UpdateConfig());
- mscButton = createCheckButton(mainComposite, "generate instrumentation for MSC generation");
+ mscButton = createCheckButton(mainComposite, "generate instrumentation for MSC logging");
mscButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
mscButton.addSelectionListener(new UpdateConfig());
+
+ dataButton = createCheckButton(mainComposite, "generate instrumentation for data logging");
+ dataButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
+ dataButton.addSelectionListener(new UpdateConfig());
verboseButton = createCheckButton(mainComposite, "generate instrumentation for verbose output");
verboseButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
@@ -302,6 +308,7 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
try {
+ // defaults: org.eclipse.etrice.generator.base.GlobalGeneratorSettings
libButton.setSelection(configuration.getAttribute(LIB, false));
boolean save = configuration.getAttribute(SAVE_GEN_MODEL, false);
saveGenModel.setSelection(save);
@@ -313,7 +320,8 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
genDocu = true;
documentationButton.setSelection(genDocu);
debugButton.setSelection(configuration.getAttribute(DEBUG, false));
- mscButton.setSelection(configuration.getAttribute(MSC, true));
+ mscButton.setSelection(configuration.getAttribute(MSC_INSTR, false));
+ dataButton.setSelection(configuration.getAttribute(DATA_INSTR, false));
verboseButton.setSelection(configuration.getAttribute(VERBOSE, false));
ScopedPreferenceStore prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.etrice.generator.ui");
@@ -355,7 +363,8 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
configuration.setAttribute(GEN_INSTANCE_DIAGRAM, documentationButton.getSelection());
configuration.setAttribute(GEN_DOCUMENTATION, documentationButton.getSelection());
configuration.setAttribute(DEBUG, debugButton.getSelection());
- configuration.setAttribute(MSC, mscButton.getSelection());
+ configuration.setAttribute(MSC_INSTR, mscButton.getSelection());
+ configuration.setAttribute(DATA_INSTR, dataButton.getSelection());
configuration.setAttribute(VERBOSE, verboseButton.getSelection());
configuration.setAttribute(USE_TRAANSLATION, useTranslationButton.getSelection());
diff --git a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java
index dadd64e09..5d8ccc209 100644
--- a/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorLaunchConfigurationDelegate.java
@@ -190,8 +190,11 @@ public abstract class GeneratorLaunchConfigurationDelegate extends AbstractJavaL
if (configuration.getAttribute(GeneratorConfigTab.DEBUG, false)) {
argString.append(" "+AbstractGenerator.OPTION_DEBUG);
}
- if (configuration.getAttribute(GeneratorConfigTab.MSC, false)) {
- argString.append(" "+AbstractGenerator.OPTION_MSC);
+ if (configuration.getAttribute(GeneratorConfigTab.MSC_INSTR, false)) {
+ argString.append(" "+AbstractGenerator.OPTION_MSC_INSTR);
+ }
+ if (configuration.getAttribute(GeneratorConfigTab.DATA_INSTR, false)) {
+ argString.append(" "+AbstractGenerator.OPTION_DATA_INSTR);
}
if (configuration.getAttribute(GeneratorConfigTab.VERBOSE, false)) {
argString.append(" "+AbstractGenerator.OPTION_VERBOSE_RT);
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
index 190d81207..ab25d6573 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
@@ -92,6 +92,7 @@ class ProjectFileFragments {
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.etrice.generator.launch.targetLanguage.launchConfigurationType">
<booleanAttribute key="MSC" value="true"/>
+ <booleanAttribute key="DataLogging" value="true"/>
<booleanAttribute key="UseTranslation" value="useTranslation"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:modelPath/baseName.etmap}"/>
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingCreationPage.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingCreationPage.java
index 91b3a8b2f..a4d2d8fec 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingCreationPage.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingCreationPage.java
@@ -13,11 +13,6 @@
package org.eclipse.etrice.generator.ui.wizard.deprecated;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.etrice.core.etmap.eTMap.Mapping;
-import org.eclipse.etrice.core.etphys.eTPhys.NodeClass;
-import org.eclipse.etrice.core.etphys.eTPhys.PhysicalSystem;
-import org.eclipse.etrice.core.etphys.eTPhys.RuntimeClass;
import org.eclipse.etrice.core.room.RoomModel;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -26,9 +21,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.xtext.resource.IResourceFactory;
-import org.eclipse.xtext.resource.SaveOptions;
import org.eclipse.xtext.resource.XtextResource;
-import org.eclipse.xtext.serializer.ISerializer;
import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor;
import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorFactory;
import org.eclipse.xtext.ui.editor.embedded.IEditedResourceProvider;
@@ -47,6 +40,7 @@ public class MappingCreationPage extends WizardPage {
private Injector etPhysInjector;
private EmbeddedEditor etPhysEditor;
+ @SuppressWarnings("unused")
private MappingBuilder builder = null;
public MappingCreationPage(Injector etMapInjector, Injector etPhysInjector) {
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingWizard.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingWizard.java
index 2731a305c..4dbf81b84 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingWizard.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/MappingWizard.java
@@ -12,11 +12,6 @@
package org.eclipse.etrice.generator.ui.wizard.deprecated;
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.etrice.core.etmap.ui.internal.ETMapActivator;
import org.eclipse.etrice.core.etphys.ui.internal.ETPhysActivator;
import org.eclipse.etrice.core.ui.internal.RoomActivator;
@@ -25,13 +20,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.xtext.resource.SaveOptions;
-import org.eclipse.xtext.resource.XtextResource;
import com.google.inject.Injector;
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/SelectRoomPage.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/SelectRoomPage.java
index aa8d03940..24ee1cc98 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/SelectRoomPage.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/deprecated/SelectRoomPage.java
@@ -202,6 +202,7 @@ public class SelectRoomPage extends WizardPage implements SelectionListener {
setErrorMessage(null);
}
+ @SuppressWarnings("deprecation")
protected void setPageComplete() {
setPageComplete(selectedRoomModel != null);
diff --git a/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java b/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java
index 7c21c3d63..5032e0ac6 100644
--- a/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java
+++ b/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java
@@ -194,6 +194,8 @@ public class ProjectFileFragments {
_builder.newLineIfNotEmpty();
_builder.append("<booleanAttribute key=\"MSC\" value=\"true\"/>");
_builder.newLine();
+ _builder.append("<booleanAttribute key=\"DataLogging\" value=\"true\"/>");
+ _builder.newLine();
_builder.append("<booleanAttribute key=\"UseTranslation\" value=\"");
_builder.append(useTranslation, "");
_builder.append("\"/>");
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
index 14c769e4b..58582a554 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
@@ -79,7 +79,8 @@ public abstract class AbstractGenerator implements IDetailCodeTranslator {
public static final String OPTION_GEN_DIR = "-genDir";
public static final String OPTION_GEN_INFO_DIR = "-genInfoDir";
public static final String OPTION_GEN_DOC_DIR = "-genDocDir";
- public static final String OPTION_MSC = "-msc_instr";
+ public static final String OPTION_MSC_INSTR = "-msc_instr";
+ public static final String OPTION_DATA_INSTR = "-data_instr";
public static final String OPTION_VERBOSE_RT = "-gen_as_verbose";
public static final String OPTION_DEBUG = "-debug";
public static final String OPTION_NOTRANSLATE = "-notranslate";
@@ -217,7 +218,7 @@ public abstract class AbstractGenerator implements IDetailCodeTranslator {
* <li>{@value #OPTION_GEN_INCREMENTAL}</li>
* <li>{@value #OPTION_GEN_INFO_DIR}</li>
* <li>{@value #OPTION_LIB}</li>
- * <li>{@value #OPTION_MSC}</li>
+ * <li>{@value #OPTION_MSC_INSTR}</li>
* <li>{@value #OPTION_NOEXIT}</li>
* <li>{@value #OPTION_SAVE_GEN_MODEL}</li>
* <li>{@value #OPTION_VERBOSE_RT}</li>
@@ -274,9 +275,12 @@ public abstract class AbstractGenerator implements IDetailCodeTranslator {
else if (arg.equals(OPTION_NOEXIT)) {
setTerminateOnError(false);
}
- else if (arg.equals(OPTION_MSC)) {
+ else if (arg.equals(OPTION_MSC_INSTR)) {
generatorSettings.setGenerateMSCInstrumentation(true);
}
+ else if (arg.equals(OPTION_DATA_INSTR)) {
+ generatorSettings.setGenerateDataInstrumentation(true);
+ }
else if (arg.equals(OPTION_NOTRANSLATE)) {
generatorSettings.setNoTranslation(true);
}
@@ -330,7 +334,7 @@ public abstract class AbstractGenerator implements IDetailCodeTranslator {
+" ["+OPTION_GEN_INFO_DIR+" <generation info directory>]"
+" ["+OPTION_GEN_DOC_DIR+" <gen documentation directory>]"
+" ["+OPTION_DEBUG+"]"
- +" ["+OPTION_MSC+"]"
+ +" ["+OPTION_MSC_INSTR+"]"
+" ["+OPTION_VERBOSE_RT+"]"
+" ["+OPTION_HELP+"]"
;
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java
deleted file mode 100644
index 635fd5ca7..000000000
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * 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:
- * Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.generator.base;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class GlobalGeneratorSettings {
-
- private List<String> inputModelURIs = new ArrayList<String>();
- private boolean generateMSCInstrumentation = false;
- private boolean generateWithVerboseOutput = false;
- private String generatorModelPath = null;
- private boolean generateDocumentation = false;
- private boolean generateAsLibrary = false;
- private boolean debugMode = false;
- private boolean noTranslation = false;
-
- public boolean generateMSCInstrumentation() {
- return generateMSCInstrumentation;
- }
-
- public void setGenerateMSCInstrumentation(
- boolean generateMSCInstrumentation) {
- this.generateMSCInstrumentation = generateMSCInstrumentation;
- }
-
- public boolean generateWithVerboseOutput() {
- return generateWithVerboseOutput;
- }
-
- public void setGenerateWithVerboseOutput(boolean generateWithVerboseOutput) {
- this.generateWithVerboseOutput = generateWithVerboseOutput;
- }
-
- public List<String> getInputModelURIs() {
- return inputModelURIs;
- }
-
- public String getGeneratorModelPath() {
- return generatorModelPath;
- }
-
- public void setGeneratorModelPath(String generatorModelPath) {
- this.generatorModelPath = generatorModelPath;
- }
-
- public boolean isGenerateDocumentation() {
- return generateDocumentation;
- }
-
- public void setGenerateDocumentation(boolean generateDocumentation) {
- this.generateDocumentation = generateDocumentation;
- }
-
- public boolean isGenerateAsLibrary() {
- return generateAsLibrary;
- }
-
- public void setGenerateAsLibrary(boolean generateAsLibrary) {
- this.generateAsLibrary = generateAsLibrary;
- }
-
- public boolean isDebugMode() {
- return debugMode;
- }
-
- public void setDebugMode(boolean debugMode) {
- this.debugMode = debugMode;
- }
-
- public void setNoTranslation(boolean b) {
- this.noTranslation = b;
- }
-
- public boolean isNoTranslation() {
- return noTranslation;
- }
-
-}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.xtend
new file mode 100644
index 000000000..c057da8ab
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.xtend
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Juergen Haug
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.base
+
+import java.util.List
+import org.eclipse.xtend.lib.annotations.Accessors
+
+@Accessors
+class GlobalGeneratorSettings {
+
+ // all models from input
+ val List<String> inputModelURIs = newArrayList
+
+ // generation options
+ boolean generateAsLibrary = false
+ boolean generateMSCInstrumentation = false
+ boolean generateDataInstrumentation = false
+ boolean noTranslation = false
+
+ // extra generators
+ String generatorModelPath = null
+ boolean generateDocumentation = false
+
+ // generator logging
+ boolean generateWithVerboseOutput = false
+ boolean debugMode = false
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java
new file mode 100644
index 000000000..2ecf06a43
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java
@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * 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:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Juergen Haug
+ */
+package org.eclipse.etrice.generator.base;
+
+import java.util.List;
+import org.eclipse.xtend.lib.annotations.Accessors;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
+import org.eclipse.xtext.xbase.lib.Pure;
+
+@Accessors
+@SuppressWarnings("all")
+public class GlobalGeneratorSettings {
+ private final List<String> inputModelURIs = CollectionLiterals.<String>newArrayList();
+
+ private boolean generateAsLibrary = false;
+
+ private boolean generateMSCInstrumentation = false;
+
+ private boolean generateDataInstrumentation = false;
+
+ private boolean noTranslation = false;
+
+ private String generatorModelPath = null;
+
+ private boolean generateDocumentation = false;
+
+ private boolean generateWithVerboseOutput = false;
+
+ private boolean debugMode = false;
+
+ @Pure
+ public List<String> getInputModelURIs() {
+ return this.inputModelURIs;
+ }
+
+ @Pure
+ public boolean isGenerateAsLibrary() {
+ return this.generateAsLibrary;
+ }
+
+ public void setGenerateAsLibrary(final boolean generateAsLibrary) {
+ this.generateAsLibrary = generateAsLibrary;
+ }
+
+ @Pure
+ public boolean isGenerateMSCInstrumentation() {
+ return this.generateMSCInstrumentation;
+ }
+
+ public void setGenerateMSCInstrumentation(final boolean generateMSCInstrumentation) {
+ this.generateMSCInstrumentation = generateMSCInstrumentation;
+ }
+
+ @Pure
+ public boolean isGenerateDataInstrumentation() {
+ return this.generateDataInstrumentation;
+ }
+
+ public void setGenerateDataInstrumentation(final boolean generateDataInstrumentation) {
+ this.generateDataInstrumentation = generateDataInstrumentation;
+ }
+
+ @Pure
+ public boolean isNoTranslation() {
+ return this.noTranslation;
+ }
+
+ public void setNoTranslation(final boolean noTranslation) {
+ this.noTranslation = noTranslation;
+ }
+
+ @Pure
+ public String getGeneratorModelPath() {
+ return this.generatorModelPath;
+ }
+
+ public void setGeneratorModelPath(final String generatorModelPath) {
+ this.generatorModelPath = generatorModelPath;
+ }
+
+ @Pure
+ public boolean isGenerateDocumentation() {
+ return this.generateDocumentation;
+ }
+
+ public void setGenerateDocumentation(final boolean generateDocumentation) {
+ this.generateDocumentation = generateDocumentation;
+ }
+
+ @Pure
+ public boolean isGenerateWithVerboseOutput() {
+ return this.generateWithVerboseOutput;
+ }
+
+ public void setGenerateWithVerboseOutput(final boolean generateWithVerboseOutput) {
+ this.generateWithVerboseOutput = generateWithVerboseOutput;
+ }
+
+ @Pure
+ public boolean isDebugMode() {
+ return this.debugMode;
+ }
+
+ public void setDebugMode(final boolean debugMode) {
+ this.debugMode = debugMode;
+ }
+}
diff --git a/plugins/org.eclipse.etrice.ui.behavior.actioneditor/build.properties b/plugins/org.eclipse.etrice.ui.behavior.actioneditor/build.properties
index 6c480f39f..c59c976d4 100644
--- a/plugins/org.eclipse.etrice.ui.behavior.actioneditor/build.properties
+++ b/plugins/org.eclipse.etrice.ui.behavior.actioneditor/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
diff --git a/plugins/org.eclipse.etrice.ui.behavior.fsm/build.properties b/plugins/org.eclipse.etrice.ui.behavior.fsm/build.properties
index 79785acae..cab10d177 100644
--- a/plugins/org.eclipse.etrice.ui.behavior.fsm/build.properties
+++ b/plugins/org.eclipse.etrice.ui.behavior.fsm/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
diff --git a/plugins/org.eclipse.etrice.ui.behavior/build.properties b/plugins/org.eclipse.etrice.ui.behavior/build.properties
index 6c480f39f..c59c976d4 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/build.properties
+++ b/plugins/org.eclipse.etrice.ui.behavior/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip
index 1e4c258a8..8cea2fd71 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
index a94dfafbd..1647fe5cb 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
index bd8c025aa..3667824f0 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip
index cf1cf3d6c..de5218df5 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
index c9f1ca009..0586d60a9 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
index c09e18d66..e1f044d4c 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
Binary files differ

Back to the top