Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-12-18 12:34:32 -0500
committerHenrik Rentz-Reichert2012-12-18 12:34:32 -0500
commit5ea296dc49f44f20c97bf396b9939f77d735f5e0 (patch)
tree2237f855c132185bd7940e5d1d270c0af929e97d /plugins
parent2c77fd9d9176c75871ac675f8632fbffde567c5c (diff)
downloadorg.eclipse.etrice-5ea296dc49f44f20c97bf396b9939f77d735f5e0.tar.gz
org.eclipse.etrice-5ea296dc49f44f20c97bf396b9939f77d735f5e0.tar.xz
org.eclipse.etrice-5ea296dc49f44f20c97bf396b9939f77d735f5e0.zip
[generator, generator.java, generator.launch] options for instrumentation
-msc_instr # generate instrumentation for MSC generation -gen_as_verbose # generate instrumentation for verbose console output
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java23
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/GlobalSettings.java41
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend36
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/StateMachineGen.xtend10
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java108
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java27
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationDelegate.java6
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/src/org/eclipse/etrice/generator/launch/GeneratorConfigTab.java16
8 files changed, 199 insertions, 68 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
index 1dfdec064..009f35065 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java
@@ -23,6 +23,7 @@ import org.eclipse.etrice.core.genmodel.etricegen.Root;
import org.eclipse.etrice.generator.base.AbstractGenerator;
import org.eclipse.etrice.generator.base.IDataConfiguration;
import org.eclipse.etrice.generator.base.IResourceURIAcceptor;
+import org.eclipse.etrice.generator.java.gen.GlobalSettings;
import org.eclipse.etrice.generator.java.gen.Validator;
import org.eclipse.etrice.generator.java.setup.GeneratorModule;
import org.eclipse.xtext.generator.IGenerator;
@@ -37,19 +38,31 @@ public class Main extends AbstractGenerator {
public static final String OPTION_DOCUMENTATION = "-genDocu";
public static final String OPTION_SAVE_GEN_MODEL = "-saveGenModel";
public static final String OPTION_DEBUG = "-debug";
+ public static final String OPTION_MSC = "-msc_instr";
+ public static final String OPTION_VERBOSE_RT = "-gen_as_verbose";
/**
* print usage message to stderr
*/
private static void printUsage() {
- output.println(Main.class.getName()+" [-saveGenModel <genmodel path>] [-genInstDiag] [-lib] <list of model file paths>");
+ output.println(Main.class.getName()+" [-saveGenModel <genmodel path>]"
+ +" ["+OPTION_DOCUMENTATION+"]"
+ +" ["+OPTION_LIB+"]"
+ +" ["+OPTION_NOEXIT+"]"
+ +" ["+OPTION_SAVE_GEN_MODEL+" <genmodel path>]"
+ +" ["+OPTION_DEBUG+"]"
+ +" ["+OPTION_MSC+"]"
+ +" ["+OPTION_VERBOSE_RT+"]"
+ +" <list of model file paths>");
output.println(" <list of model file paths> # model file paths may be specified as");
output.println(" # e.g. C:\\path\\to\\model\\mymodel.room");
- output.println(" -saveGenModel <genmodel path> # if specified the generator model will be saved to this location");
output.println(" -genDocu # if specified documentation is created");
output.println(" -lib # if specified all classes are generated and no instances");
output.println(" -noexit # if specified the JVM is not exited");
+ output.println(" -saveGenModel <genmodel path> # if specified the generator model will be saved to this location");
output.println(" -debug # if specified create debug output");
+ output.println(" -msc_instr # generate instrumentation for MSC generation");
+ output.println(" -gen_as_verbose # generate instrumentation for verbose console output");
}
public static void main(String[] args) {
@@ -101,6 +114,12 @@ public class Main extends AbstractGenerator {
else if (args[i].equals(OPTION_NOEXIT)) {
setTerminateOnError(false);
}
+ else if (args[i].equals(OPTION_MSC)) {
+ GlobalSettings.setGenerateMSCInstrumentation(true);
+ }
+ else if (args[i].equals(OPTION_VERBOSE_RT)) {
+ GlobalSettings.setGenerateWithVerboseOutput(true);
+ }
else if (args[i].equals(OPTION_DEBUG)) {
debug = true;
}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/GlobalSettings.java b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/GlobalSettings.java
new file mode 100644
index 000000000..3cdefe7dc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/GlobalSettings.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.java.gen;
+
+/**
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class GlobalSettings {
+
+ private static boolean generateMSCInstrumentation = false;
+ private static boolean generateWithVerboseOutput = false;
+
+ public static boolean generateMSCInstrumentation() {
+ return generateMSCInstrumentation;
+ }
+
+ public static void setGenerateMSCInstrumentation(
+ boolean generateMSCInstrumentation) {
+ GlobalSettings.generateMSCInstrumentation = generateMSCInstrumentation;
+ }
+
+ public static boolean generateWithVerboseOutput() {
+ return generateWithVerboseOutput;
+ }
+
+ public static void setGenerateWithVerboseOutput(boolean generateWithVerboseOutput) {
+ GlobalSettings.generateWithVerboseOutput = generateWithVerboseOutput;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
index 492a8cc73..64e6a247f 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
@@ -60,7 +60,9 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
import org.eclipse.etrice.runtime.java.messaging.Address;
import org.eclipse.etrice.runtime.java.messaging.Message;
import org.eclipse.etrice.runtime.java.modelbase.*;
- import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
+ «IF GlobalSettings::generateMSCInstrumentation»
+ import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
+ «ENDIF»
import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
«pc.userCode(1)»
@@ -107,14 +109,18 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
// constructors
public «portClassName»(IEventReceiver actor, String name, int localId, Address addr, Address peerAddress) {
this(actor, name, localId, 0, addr, peerAddress);
- DebuggingService.getInstance().addPortInstance(this);
+ «IF GlobalSettings::generateMSCInstrumentation»
+ DebuggingService.getInstance().addPortInstance(this);
+ «ENDIF»
}
public «portClassName»(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {
super(actor, name, localId, idx, addr, peerAddress);
«IF pclass!=null»
«pclass.attributes.attributeInitialization(pclass, true)»
«ENDIF»
- DebuggingService.getInstance().addPortInstance(this);
+ «IF GlobalSettings::generateMSCInstrumentation»
+ DebuggingService.getInstance().addPortInstance(this);
+ «ENDIF»
}
@Override
@@ -122,13 +128,13 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
if (!(m instanceof EventMessage))
return;
EventMessage msg = (EventMessage) m;
- if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX)
- System.out.println("unknown");
- else {
- if (messageStrings[msg.getEvtId()] != "timerTick"){
-««« TODOTS: model switch for activation
- DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
- }
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ «IF GlobalSettings::generateMSCInstrumentation»
+ if (messageStrings[msg.getEvtId()] != "timerTick"){
+««« TODOTS: model switch for activation
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ }
+ «ENDIF»
«IF pc.handlesReceive(conj)»
switch (msg.getEvtId()) {
«FOR hdlr : pc.getReceiveHandlers(conj)»
@@ -250,10 +256,12 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
«FOR command : hdlr.detailCode.commands» «command»
«ENDFOR»
«ELSE»
- if (messageStrings[ «dir»_«m.name»] != "timerTick"){
-««« TODOTS: model switch for activation
- DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[«dir»_«m.name»]);
- }
+ «IF GlobalSettings::generateMSCInstrumentation»
+ if (messageStrings[ «dir»_«m.name»] != "timerTick") {
+««« TODOTS: model switch for activation
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[«dir»_«m.name»]);
+ }
+ «ENDIF»
if (getPeerAddress()!=null)
«IF m.data==null»getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), «dir»_«m.name»));
«ELSE»getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), «dir»_«m.name», «m.data.name»«IF (!m.data.refType.ref && !(m.data.refType.type instanceof PrimitiveType))».deepCopy()«ENDIF»));
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/StateMachineGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/StateMachineGen.xtend
index 585927587..a6baa5e1a 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/StateMachineGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/StateMachineGen.xtend
@@ -39,10 +39,14 @@ class StateMachineGen extends GenericStateMachineGenerator {
protected int history[] = {NO_STATE,NO_STATE«FOR state : ac.getAllBaseStates()»,NO_STATE«ENDFOR»};
private void setState(int new_state) {
- DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
+ «IF GlobalSettings::generateMSCInstrumentation»
+ DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
+ «ENDIF»
if (stateStrings[new_state]!="Idle") {
-««« TODOTS: model switch for activation
- System.out.println(getInstancePath() + " -> " + stateStrings[new_state]);
+ «IF GlobalSettings::generateWithVerboseOutput»
+ System.out.println("state switch of "+getInstancePath() + ": "
+ + stateStrings[this.state] + " -> " + stateStrings[new_state]);
+ «ENDIF»
}
this.state = new_state;
}
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 9f2355e7a..c0bfc0e1c 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
@@ -25,6 +25,7 @@ import org.eclipse.etrice.generator.generic.ProcedureHelpers;
import org.eclipse.etrice.generator.generic.RoomExtensions;
import org.eclipse.etrice.generator.generic.TypeHelpers;
import org.eclipse.etrice.generator.java.gen.DataClassGen;
+import org.eclipse.etrice.generator.java.gen.GlobalSettings;
import org.eclipse.etrice.generator.java.gen.Initialization;
import org.eclipse.etrice.generator.java.gen.JavaExtensions;
import org.eclipse.xtend2.lib.StringConcatenation;
@@ -94,8 +95,13 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLine();
_builder.append("import org.eclipse.etrice.runtime.java.modelbase.*;");
_builder.newLine();
- _builder.append("import org.eclipse.etrice.runtime.java.debugging.DebuggingService;");
- _builder.newLine();
+ {
+ boolean _generateMSCInstrumentation = GlobalSettings.generateMSCInstrumentation();
+ if (_generateMSCInstrumentation) {
+ _builder.append("import org.eclipse.etrice.runtime.java.debugging.DebuggingService;");
+ _builder.newLine();
+ }
+ }
_builder.append("import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;");
_builder.newLine();
_builder.newLine();
@@ -233,9 +239,14 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.append("\t\t");
_builder.append("this(actor, name, localId, 0, addr, peerAddress);");
_builder.newLine();
- _builder.append("\t\t");
- _builder.append("DebuggingService.getInstance().addPortInstance(this);");
- _builder.newLine();
+ {
+ boolean _generateMSCInstrumentation = GlobalSettings.generateMSCInstrumentation();
+ if (_generateMSCInstrumentation) {
+ _builder.append("\t\t");
+ _builder.append("DebuggingService.getInstance().addPortInstance(this);");
+ _builder.newLine();
+ }
+ }
_builder.append("\t");
_builder.append("}");
_builder.newLine();
@@ -257,9 +268,14 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.newLineIfNotEmpty();
}
}
- _builder.append("\t\t");
- _builder.append("DebuggingService.getInstance().addPortInstance(this);");
- _builder.newLine();
+ {
+ boolean _generateMSCInstrumentation_1 = GlobalSettings.generateMSCInstrumentation();
+ if (_generateMSCInstrumentation_1) {
+ _builder.append("\t\t");
+ _builder.append("DebuggingService.getInstance().addPortInstance(this);");
+ _builder.newLine();
+ }
+ }
_builder.append("\t");
_builder.append("}");
_builder.newLine();
@@ -280,24 +296,24 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
_builder.append("EventMessage msg = (EventMessage) m;");
_builder.newLine();
_builder.append("\t\t\t");
- _builder.append("if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX)");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("System.out.println(\"unknown\");");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("else {");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("if (messageStrings[msg.getEvtId()] != \"timerTick\"){");
- _builder.newLine();
- _builder.append("\t\t\t\t\t");
- _builder.append("DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("}");
+ _builder.append("if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {");
_builder.newLine();
{
+ boolean _generateMSCInstrumentation_2 = GlobalSettings.generateMSCInstrumentation();
+ if (_generateMSCInstrumentation_2) {
+ _builder.append("\t\t\t\t");
+ _builder.append("if (messageStrings[msg.getEvtId()] != \"timerTick\"){");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("\t");
+ _builder.append("DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);");
+ _builder.newLine();
+ _builder.append("\t\t\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
+ }
+ {
boolean _handlesReceive = this._roomExtensions.handlesReceive(pc, (conj).booleanValue());
if (_handlesReceive) {
_builder.append("\t\t\t\t");
@@ -674,25 +690,31 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
}
}
} else {
- _builder.append("\t");
- _builder.append("if (messageStrings[ ");
- _builder.append(dir, " ");
- _builder.append("_");
- String _name = m.getName();
- _builder.append(_name, " ");
- _builder.append("] != \"timerTick\"){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[");
- _builder.append(dir, " ");
- _builder.append("_");
- String _name_1 = m.getName();
- _builder.append(_name_1, " ");
- _builder.append("]);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
+ {
+ boolean _generateMSCInstrumentation = GlobalSettings.generateMSCInstrumentation();
+ if (_generateMSCInstrumentation) {
+ _builder.append("\t");
+ _builder.append("if (messageStrings[ ");
+ _builder.append(dir, " ");
+ _builder.append("_");
+ String _name = m.getName();
+ _builder.append(_name, " ");
+ _builder.append("] != \"timerTick\") {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[");
+ _builder.append(dir, " ");
+ _builder.append("_");
+ String _name_1 = m.getName();
+ _builder.append(_name_1, " ");
+ _builder.append("]);");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
+ }
_builder.append("\t");
_builder.append("if (getPeerAddress()!=null)");
_builder.newLine();
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 bb397d606..e6ac84165 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
@@ -8,6 +8,7 @@ import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.State;
import org.eclipse.etrice.generator.generic.GenericStateMachineGenerator;
import org.eclipse.etrice.generator.generic.RoomExtensions;
+import org.eclipse.etrice.generator.java.gen.GlobalSettings;
import org.eclipse.xtend2.lib.StringConcatenation;
@Singleton
@@ -57,15 +58,29 @@ public class StateMachineGen extends GenericStateMachineGenerator {
_builder.newLine();
_builder.append("private void setState(int new_state) {");
_builder.newLine();
- _builder.append("\t");
- _builder.append("DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);");
- _builder.newLine();
+ {
+ boolean _generateMSCInstrumentation = GlobalSettings.generateMSCInstrumentation();
+ if (_generateMSCInstrumentation) {
+ _builder.append("\t");
+ _builder.append("DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);");
+ _builder.newLine();
+ }
+ }
_builder.append("\t");
_builder.append("if (stateStrings[new_state]!=\"Idle\") {");
_builder.newLine();
- _builder.append("\t\t");
- _builder.append("System.out.println(getInstancePath() + \" -> \" + stateStrings[new_state]);");
- _builder.newLine();
+ {
+ boolean _generateWithVerboseOutput = GlobalSettings.generateWithVerboseOutput();
+ if (_generateWithVerboseOutput) {
+ _builder.append("\t\t");
+ _builder.append("System.out.println(\"state switch of \"+getInstancePath() + \": \"");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("\t\t");
+ _builder.append("+ stateStrings[this.state] + \" -> \" + stateStrings[new_state]);");
+ _builder.newLine();
+ }
+ }
_builder.append("\t");
_builder.append("}\t");
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationDelegate.java b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationDelegate.java
index 9e856ad54..13c957bbf 100644
--- a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationDelegate.java
@@ -43,6 +43,12 @@ public class JavaGeneratorLaunchConfigurationDelegate extends GeneratorLaunchCon
if (configuration.getAttribute(JavaGeneratorConfigTab.DEBUG, false)) {
argString.append(" "+Main.OPTION_DEBUG);
}
+ if (configuration.getAttribute(JavaGeneratorConfigTab.MSC, false)) {
+ argString.append(" "+Main.OPTION_MSC);
+ }
+ if (configuration.getAttribute(JavaGeneratorConfigTab.VERBOSE, false)) {
+ argString.append(" "+Main.OPTION_VERBOSE_RT);
+ }
}
/* (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 a77348eec..98ba03cf1 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
@@ -65,6 +65,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 VERBOSE = "Verbose";
private Button libButton;
private Button documentationButton;
@@ -72,6 +74,8 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
private Text genModelPath;
private Button browsePath;
private Button debugButton;
+ private Button mscButton;
+ private Button verboseButton;
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
@@ -134,6 +138,14 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
debugButton = createCheckButton(mainComposite, "debug output");
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.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
+ mscButton.addSelectionListener(new UpdateConfig());
+
+ verboseButton = createCheckButton(mainComposite, "generate instrumentation for verbose output");
+ verboseButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
+ verboseButton.addSelectionListener(new UpdateConfig());
addFurtherControls(mainComposite);
}
@@ -215,6 +227,8 @@ public abstract class GeneratorConfigTab extends AbstractLaunchConfigurationTab
genDocu = true;
documentationButton.setSelection(genDocu);
debugButton.setSelection(configuration.getAttribute(DEBUG, false));
+ mscButton.setSelection(configuration.getAttribute(MSC, false));
+ verboseButton.setSelection(configuration.getAttribute(VERBOSE, false));
}
catch (CoreException e) {
e.printStackTrace();
@@ -232,6 +246,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(VERBOSE, verboseButton.getSelection());
}
/* (non-Javadoc)

Back to the top