diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.launch.java')
12 files changed, 337 insertions, 337 deletions
diff --git a/plugins/org.eclipse.etrice.generator.launch.java/.classpath b/plugins/org.eclipse.etrice.generator.launch.java/.classpath index 8a8f1668c..ad32c83a7 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/.classpath +++ b/plugins/org.eclipse.etrice.generator.launch.java/.classpath @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.etrice.generator.launch.java/.gitignore b/plugins/org.eclipse.etrice.generator.launch.java/.gitignore index f68b3dddc..fe99505dc 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/.gitignore +++ b/plugins/org.eclipse.etrice.generator.launch.java/.gitignore @@ -1,2 +1,2 @@ -bin
-
+bin + diff --git a/plugins/org.eclipse.etrice.generator.launch.java/.project b/plugins/org.eclipse.etrice.generator.launch.java/.project index fc8ed8a27..6e61333fd 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/.project +++ b/plugins/org.eclipse.etrice.generator.launch.java/.project @@ -1,28 +1,28 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.generator.launch.java</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <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.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.etrice.generator.launch.java</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.etrice.generator.launch.java/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.generator.launch.java/.settings/org.eclipse.jdt.core.prefs index dcfadd03c..c6c26402c 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/.settings/org.eclipse.jdt.core.prefs +++ b/plugins/org.eclipse.etrice.generator.launch.java/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,8 @@ -#Tue Aug 30 16:50:14 CEST 2011
-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
+#Tue Aug 30 16:50:14 CEST 2011 +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.launch.java/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.launch.java/META-INF/MANIFEST.MF index 518844a9d..a260d43c6 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.etrice.generator.launch.java/META-INF/MANIFEST.MF @@ -1,23 +1,23 @@ -Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: eTrice Java Generator Launcher
-Bundle-SymbolicName: org.eclipse.etrice.generator.launch.java;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.etrice.generator.launch.java.Activator
-Require-Bundle: org.eclipse.etrice.generator;bundle-version="0.1.0",
- org.eclipse.etrice.generator.java;bundle-version="0.1.0",
- org.eclipse.etrice.generator.launch;bundle-version="0.1.0",
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.debug.core,
- 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.etrice.generator.ui;bundle-version="0.3.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.eclipse.jdt.launching,
- org.eclipse.ui.dialogs
-Bundle-Vendor: Eclipse eTrice (Incubation)
-Export-Package: org.eclipse.etrice.generator.launch.java
+Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: eTrice Java Generator Launcher +Bundle-SymbolicName: org.eclipse.etrice.generator.launch.java;singleton:=true +Bundle-Version: 0.3.0.qualifier +Bundle-Activator: org.eclipse.etrice.generator.launch.java.Activator +Require-Bundle: org.eclipse.etrice.generator;bundle-version="0.1.0", + org.eclipse.etrice.generator.java;bundle-version="0.1.0", + org.eclipse.etrice.generator.launch;bundle-version="0.1.0", + org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.debug.core, + 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.etrice.generator.ui;bundle-version="0.3.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: org.eclipse.jdt.launching, + org.eclipse.ui.dialogs +Bundle-Vendor: Eclipse eTrice (Incubation) +Export-Package: org.eclipse.etrice.generator.launch.java diff --git a/plugins/org.eclipse.etrice.generator.launch.java/build.properties b/plugins/org.eclipse.etrice.generator.launch.java/build.properties index 285b8bf47..6c480f39f 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/build.properties +++ b/plugins/org.eclipse.etrice.generator.launch.java/build.properties @@ -1,6 +1,6 @@ -source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/
+source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/ diff --git a/plugins/org.eclipse.etrice.generator.launch.java/plugin.xml b/plugins/org.eclipse.etrice.generator.launch.java/plugin.xml index b83d8b675..5238985d3 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/plugin.xml +++ b/plugins/org.eclipse.etrice.generator.launch.java/plugin.xml @@ -1,32 +1,32 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- delegate="org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationDelegate"
- delegateDescription="Generates Java source code from ROOM models"
- delegateName="eTrice Java Generator Delegate"
- id="org.eclipse.etrice.generator.launch.java.launchConfigurationType"
- modes="run,debug"
- name="eTrice Java Generator">
- </launchConfigurationType>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- configTypeID="org.eclipse.etrice.generator.launch.java.launchConfigurationType"
- icon="icons/eTrice-launch.gif"
- id="org.eclipse.etrice.generator.launch.java.launchConfigurationTypeImage">
- </launchConfigurationTypeImage>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- class="org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationTabGroup"
- description="Tab Group for eTrice Java Generator Launch Configurations"
- id="org.eclipse.etrice.generator.launch.java.launchConfigurationTabGroup"
- type="org.eclipse.etrice.generator.launch.java.launchConfigurationType">
- </launchConfigurationTabGroup>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.debug.core.launchConfigurationTypes"> + <launchConfigurationType + delegate="org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationDelegate" + delegateDescription="Generates Java source code from ROOM models" + delegateName="eTrice Java Generator Delegate" + id="org.eclipse.etrice.generator.launch.java.launchConfigurationType" + modes="run,debug" + name="eTrice Java Generator"> + </launchConfigurationType> + </extension> + <extension + point="org.eclipse.debug.ui.launchConfigurationTypeImages"> + <launchConfigurationTypeImage + configTypeID="org.eclipse.etrice.generator.launch.java.launchConfigurationType" + icon="icons/eTrice-launch.gif" + id="org.eclipse.etrice.generator.launch.java.launchConfigurationTypeImage"> + </launchConfigurationTypeImage> + </extension> + <extension + point="org.eclipse.debug.ui.launchConfigurationTabGroups"> + <launchConfigurationTabGroup + class="org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationTabGroup" + description="Tab Group for eTrice Java Generator Launch Configurations" + id="org.eclipse.etrice.generator.launch.java.launchConfigurationTabGroup" + type="org.eclipse.etrice.generator.launch.java.launchConfigurationType"> + </launchConfigurationTabGroup> + </extension> +</plugin> diff --git a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/Activator.java b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/Activator.java index e383deff5..aa4c6c621 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/Activator.java +++ b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/Activator.java @@ -1,53 +1,53 @@ -package org.eclipse.etrice.generator.launch.java;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.etrice.generator.launch.java"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public void log(Exception e) {
- }
-
-}
+package org.eclipse.etrice.generator.launch.java; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.etrice.generator.launch.java"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + public void log(Exception e) { + } + +} 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 32a357e81..4f0e1d13e 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 @@ -1,30 +1,30 @@ -/*******************************************************************************
- * 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:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.generator.launch.java;
-
-import org.eclipse.etrice.generator.launch.GeneratorConfigTab;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class JavaGeneratorConfigTab extends GeneratorConfigTab {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
- @Override
- public String getName() {
- return "Java Generator";
- }
-}
+/******************************************************************************* + * 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: + * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.generator.launch.java; + +import org.eclipse.etrice.generator.launch.GeneratorConfigTab; + +/** + * @author Henrik Rentz-Reichert + * + */ +public class JavaGeneratorConfigTab extends GeneratorConfigTab { + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() + */ + @Override + public String getName() { + return "Java Generator"; + } +} 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 5a8cfe32d..06c23773a 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 @@ -1,89 +1,89 @@ -/*******************************************************************************
- * 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:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.generator.launch.java;
-
-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.java.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
- *
- */
-public class JavaGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConfigurationDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#addArguments(org.eclipse.debug.core.ILaunchConfiguration, java.lang.StringBuffer)
- */
- @SuppressWarnings("deprecation") // stay compatible with older launch configurations
- @Override
- protected void addArguments(ILaunchConfiguration configuration, StringBuffer argString) throws CoreException {
- if (configuration.getAttribute(JavaGeneratorConfigTab.LIB, false)) {
- argString.append(" "+Main.OPTION_LIB);
- }
- if (configuration.getAttribute(JavaGeneratorConfigTab.SAVE_GEN_MODEL, false)) {
- argString.append(" "+Main.OPTION_SAVE_GEN_MODEL);
- argString.append(" "+configuration.getAttribute(JavaGeneratorConfigTab.GEN_MODEL_PATH, "?"));
- }
- if (configuration.getAttribute(JavaGeneratorConfigTab.GEN_DOCUMENTATION, false)
- || configuration.getAttribute(JavaGeneratorConfigTab.GEN_INSTANCE_DIAGRAM, false))
- argString.append(" "+Main.OPTION_DOCUMENTATION);
- 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);
- }
-
- 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)
- * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#runGenerator(java.lang.String[], org.eclipse.etrice.generator.launch.ILineOutput)
- */
- @Override
- protected void runGenerator(String[] args, ILineOutput out) {
- org.eclipse.etrice.generator.java.Main.setOutput(out);
- org.eclipse.etrice.generator.java.Main.setTerminateOnError(false);
- org.eclipse.etrice.generator.java.Main.main(args);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#getConsoleName()
- */
- @Override
- protected String getConsoleName() {
- return "eTrice Java Generator Console";
- }
-
-}
+/******************************************************************************* + * 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: + * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.generator.launch.java; + +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.java.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 + * + */ +public class JavaGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConfigurationDelegate { + + /* (non-Javadoc) + * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#addArguments(org.eclipse.debug.core.ILaunchConfiguration, java.lang.StringBuffer) + */ + @SuppressWarnings("deprecation") // stay compatible with older launch configurations + @Override + protected void addArguments(ILaunchConfiguration configuration, StringBuffer argString) throws CoreException { + if (configuration.getAttribute(JavaGeneratorConfigTab.LIB, false)) { + argString.append(" "+Main.OPTION_LIB); + } + if (configuration.getAttribute(JavaGeneratorConfigTab.SAVE_GEN_MODEL, false)) { + argString.append(" "+Main.OPTION_SAVE_GEN_MODEL); + argString.append(" "+configuration.getAttribute(JavaGeneratorConfigTab.GEN_MODEL_PATH, "?")); + } + if (configuration.getAttribute(JavaGeneratorConfigTab.GEN_DOCUMENTATION, false) + || configuration.getAttribute(JavaGeneratorConfigTab.GEN_INSTANCE_DIAGRAM, false)) + argString.append(" "+Main.OPTION_DOCUMENTATION); + 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); + } + + 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) + * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#runGenerator(java.lang.String[], org.eclipse.etrice.generator.launch.ILineOutput) + */ + @Override + protected void runGenerator(String[] args, ILineOutput out) { + org.eclipse.etrice.generator.java.Main.setOutput(out); + org.eclipse.etrice.generator.java.Main.setTerminateOnError(false); + org.eclipse.etrice.generator.java.Main.main(args); + } + + /* (non-Javadoc) + * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#getConsoleName() + */ + @Override + protected String getConsoleName() { + return "eTrice Java Generator Console"; + } + +} diff --git a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationTabGroup.java b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationTabGroup.java index b55018278..5ad45e17a 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationTabGroup.java +++ b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorLaunchConfigurationTabGroup.java @@ -1,24 +1,24 @@ -package org.eclipse.etrice.generator.launch.java;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.EnvironmentTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.etrice.generator.launch.GeneratorRefreshTab;
-
-public class JavaGeneratorLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
-
- @Override
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
- new JavaGeneratorMainTab(),
- new JavaGeneratorConfigTab(),
- new GeneratorRefreshTab(),
- new EnvironmentTab(),
- new CommonTab()
- };
- setTabs(tabs);
- }
-
-}
+package org.eclipse.etrice.generator.launch.java; + +import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; +import org.eclipse.debug.ui.CommonTab; +import org.eclipse.debug.ui.EnvironmentTab; +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.debug.ui.ILaunchConfigurationTab; +import org.eclipse.etrice.generator.launch.GeneratorRefreshTab; + +public class JavaGeneratorLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { + + @Override + public void createTabs(ILaunchConfigurationDialog dialog, String mode) { + ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] { + new JavaGeneratorMainTab(), + new JavaGeneratorConfigTab(), + new GeneratorRefreshTab(), + new EnvironmentTab(), + new CommonTab() + }; + setTabs(tabs); + } + +} diff --git a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorMainTab.java b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorMainTab.java index d920e3ea5..480d52b8a 100644 --- a/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorMainTab.java +++ b/plugins/org.eclipse.etrice.generator.launch.java/src/org/eclipse/etrice/generator/launch/java/JavaGeneratorMainTab.java @@ -1,35 +1,35 @@ -/*******************************************************************************
- * 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:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.generator.launch.java;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.etrice.generator.launch.GeneratorMainTab;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class JavaGeneratorMainTab extends GeneratorMainTab {
-
- /* (non-Javadoc)
- * @see org.eclipse.etrice.generator.launch.GeneratorMainTab#isValidModelFile(org.eclipse.core.resources.IResource)
- */
- @Override
- protected boolean isValidModelFile(IResource resource) {
- return resource.getName().endsWith(".room")
- || resource.getName().endsWith(".config")
- || resource.getName().endsWith(".etphys")
- || resource.getName().endsWith(".etmap");
- }
-
-}
+/******************************************************************************* + * 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: + * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.generator.launch.java; + +import org.eclipse.core.resources.IResource; +import org.eclipse.etrice.generator.launch.GeneratorMainTab; + +/** + * @author Henrik Rentz-Reichert + * + */ +public class JavaGeneratorMainTab extends GeneratorMainTab { + + /* (non-Javadoc) + * @see org.eclipse.etrice.generator.launch.GeneratorMainTab#isValidModelFile(org.eclipse.core.resources.IResource) + */ + @Override + protected boolean isValidModelFile(IResource resource) { + return resource.getName().endsWith(".room") + || resource.getName().endsWith(".config") + || resource.getName().endsWith(".etphys") + || resource.getName().endsWith(".etmap"); + } + +} |