Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-04-03 10:56:33 -0400
committerHenrik Rentz-Reichert2013-04-03 11:03:24 -0400
commitee213d0eebbdcb9eb9e68c2a6446076f077d6bef (patch)
tree3b752b2b7cc58b4d839b56668ff8cb0b0e07dd80 /plugins/org.eclipse.etrice.generator.launch.c
parent5aceef8fd710f71f58f88d52938b05183d5379e6 (diff)
downloadorg.eclipse.etrice-ee213d0eebbdcb9eb9e68c2a6446076f077d6bef.tar.gz
org.eclipse.etrice-ee213d0eebbdcb9eb9e68c2a6446076f077d6bef.tar.xz
org.eclipse.etrice-ee213d0eebbdcb9eb9e68c2a6446076f077d6bef.zip
[generator.*] bug 367446: move parameters for codegenerators from generators to preferences
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367446 for - incremental generation - directory for generated code - directory for generated info - directory for generated documentation
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.launch.c')
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.c/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.c/src/org/eclipse/etrice/generator/launch/c/CGeneratorLaunchConfigurationDelegate.java19
2 files changed, 20 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.generator.launch.c/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.launch.c/META-INF/MANIFEST.MF
index 63055e931..d5881014f 100644
--- a/plugins/org.eclipse.etrice.generator.launch.c/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.launch.c/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.etrice.generator;bundle-version="0.3.0",
org.eclipse.debug.ui,
org.eclipse.jdt.ui;bundle-version="3.7.0",
org.eclipse.jdt.core;bundle-version="3.7.0",
- org.eclipse.core.variables;bundle-version="3.2.500"
+ org.eclipse.core.variables;bundle-version="3.2.500",
+ org.eclipse.etrice.generator.ui;bundle-version="0.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.jdt.launching,
diff --git a/plugins/org.eclipse.etrice.generator.launch.c/src/org/eclipse/etrice/generator/launch/c/CGeneratorLaunchConfigurationDelegate.java b/plugins/org.eclipse.etrice.generator.launch.c/src/org/eclipse/etrice/generator/launch/c/CGeneratorLaunchConfigurationDelegate.java
index 49f76c448..7421b957a 100644
--- a/plugins/org.eclipse.etrice.generator.launch.c/src/org/eclipse/etrice/generator/launch/c/CGeneratorLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.etrice.generator.launch.c/src/org/eclipse/etrice/generator/launch/c/CGeneratorLaunchConfigurationDelegate.java
@@ -13,10 +13,13 @@
package org.eclipse.etrice.generator.launch.c;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.etrice.generator.base.ILineOutput;
import org.eclipse.etrice.generator.c.Main;
import org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate;
+import org.eclipse.etrice.generator.ui.preferences.PreferenceConstants;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
/**
* @author Henrik Rentz-Reichert
@@ -27,7 +30,7 @@ public class CGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConfig
/* (non-Javadoc)
* @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#addArguments(org.eclipse.debug.core.ILaunchConfiguration, java.lang.StringBuffer)
*/
- @SuppressWarnings("deprecation") // need this for backwar compatibility
+ @SuppressWarnings("deprecation") // need this for backward compatibility
@Override
protected void addArguments(ILaunchConfiguration configuration, StringBuffer argString) throws CoreException {
if (configuration.getAttribute(CGeneratorConfigTab.LIB, false)) {
@@ -40,6 +43,20 @@ public class CGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConfig
if (configuration.getAttribute(CGeneratorConfigTab.GEN_DOCUMENTATION, false)
|| configuration.getAttribute(CGeneratorConfigTab.GEN_INSTANCE_DIAGRAM, false))
argString.append(" "+Main.OPTION_GEN_INST_DIAG);
+
+ ScopedPreferenceStore prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.etrice.generator.ui");
+ if (prefStore.getBoolean(PreferenceConstants.GEN_INCREMENTAL)) {
+ argString.append(" "+Main.OPTION_GEN_INCREMENTAL);
+ }
+
+ argString.append(" "+Main.OPTION_GEN_DIR);
+ argString.append(" "+prefStore.getString(PreferenceConstants.GEN_DIR));
+
+ argString.append(" "+Main.OPTION_GEN_INFO_DIR);
+ argString.append(" "+prefStore.getString(PreferenceConstants.GEN_INFO_DIR));
+
+ argString.append(" "+Main.OPTION_GEN_DOC_DIR);
+ argString.append(" "+prefStore.getString(PreferenceConstants.GEN_DOC_DIR));
}
/* (non-Javadoc)

Back to the top