Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-01-17 15:27:42 +0000
committerHenrik Rentz-Reichert2013-01-17 15:27:42 +0000
commitc6f4dda244f74e45aa6f8fb507098a6c97e2566b (patch)
treed657081a54be32b82d99f4578d0dafc537c355c9
parent7d59957221934d0c85b19fc2fdc6980197e90a8f (diff)
downloadorg.eclipse.etrice-c6f4dda244f74e45aa6f8fb507098a6c97e2566b.tar.gz
org.eclipse.etrice-c6f4dda244f74e45aa6f8fb507098a6c97e2566b.tar.xz
org.eclipse.etrice-c6f4dda244f74e45aa6f8fb507098a6c97e2566b.zip
[examples] added minimal derived Java generator
-rw-r--r--examples/my.etrice.generator.launch/.classpath7
-rw-r--r--examples/my.etrice.generator.launch/.gitignore3
-rw-r--r--examples/my.etrice.generator.launch/.project28
-rw-r--r--examples/my.etrice.generator.launch/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/my.etrice.generator.launch/META-INF/MANIFEST.MF15
-rw-r--r--examples/my.etrice.generator.launch/build.properties4
-rw-r--r--examples/my.etrice.generator.launch/icons/derived-launch.gifbin0 -> 894 bytes
-rw-r--r--examples/my.etrice.generator.launch/plugin.xml32
-rw-r--r--examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorConfigTab.java32
-rw-r--r--examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationDelegate.java47
-rw-r--r--examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationTabGroup.java44
-rw-r--r--examples/my.etrice.generator/.classpath7
-rw-r--r--examples/my.etrice.generator/.gitignore3
-rw-r--r--examples/my.etrice.generator/.project28
-rw-r--r--examples/my.etrice.generator/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/my.etrice.generator/META-INF/MANIFEST.MF11
-rw-r--r--examples/my.etrice.generator/build.properties4
-rw-r--r--examples/my.etrice.generator/src/my/etrice/generator/DerivedGenerator.java32
-rw-r--r--examples/my.etrice.generator/src/my/etrice/generator/gen/DerivedTranslationProvider.java35
-rw-r--r--examples/my.etrice.generator/src/my/etrice/generator/setup/DerivedGeneratorModule.java52
-rw-r--r--plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.java/META-INF/MANIFEST.MF1
22 files changed, 403 insertions, 1 deletions
diff --git a/examples/my.etrice.generator.launch/.classpath b/examples/my.etrice.generator.launch/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/examples/my.etrice.generator.launch/.classpath
@@ -0,0 +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>
diff --git a/examples/my.etrice.generator.launch/.gitignore b/examples/my.etrice.generator.launch/.gitignore
new file mode 100644
index 000000000..079929515
--- /dev/null
+++ b/examples/my.etrice.generator.launch/.gitignore
@@ -0,0 +1,3 @@
+bin
+*._trace
+*.smap
diff --git a/examples/my.etrice.generator.launch/.project b/examples/my.etrice.generator.launch/.project
new file mode 100644
index 000000000..a8c9fc9fb
--- /dev/null
+++ b/examples/my.etrice.generator.launch/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>my.etrice.generator.launch</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/examples/my.etrice.generator.launch/.settings/org.eclipse.jdt.core.prefs b/examples/my.etrice.generator.launch/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f287d53cf
--- /dev/null
+++ b/examples/my.etrice.generator.launch/.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/examples/my.etrice.generator.launch/META-INF/MANIFEST.MF b/examples/my.etrice.generator.launch/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..f5ca59dd9
--- /dev/null
+++ b/examples/my.etrice.generator.launch/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Derived Generator Launcher
+Bundle-SymbolicName: my.etrice.generator.launch;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.etrice.generator;bundle-version="0.3.0",
+ org.eclipse.etrice.generator.launch;bundle-version="0.3.0",
+ org.eclipse.etrice.generator.launch.java;bundle-version="0.3.0",
+ my.etrice.generator;bundle-version="1.0.0",
+ org.eclipse.debug.ui;bundle-version="3.8.1",
+ org.eclipse.swt;bundle-version="3.100.1",
+ org.eclipse.core.runtime;bundle-version="3.8.0",
+ org.eclipse.jdt.launching;bundle-version="3.6.100",
+ org.eclipse.etrice.generator.java;bundle-version="0.3.0"
diff --git a/examples/my.etrice.generator.launch/build.properties b/examples/my.etrice.generator.launch/build.properties
new file mode 100644
index 000000000..41eb6ade2
--- /dev/null
+++ b/examples/my.etrice.generator.launch/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/examples/my.etrice.generator.launch/icons/derived-launch.gif b/examples/my.etrice.generator.launch/icons/derived-launch.gif
new file mode 100644
index 000000000..ca3906465
--- /dev/null
+++ b/examples/my.etrice.generator.launch/icons/derived-launch.gif
Binary files differ
diff --git a/examples/my.etrice.generator.launch/plugin.xml b/examples/my.etrice.generator.launch/plugin.xml
new file mode 100644
index 000000000..09cedb68d
--- /dev/null
+++ b/examples/my.etrice.generator.launch/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="my.etrice.generator.launch.DerivedGeneratorLaunchConfigurationDelegate"
+ delegateDescription="Generates Java source code from ROOM models"
+ delegateName="Derived Java Generator Delegate"
+ id="my.etrice.generator.launch.launchConfigurationType"
+ modes="run,debug"
+ name="Derived Java Generator">
+ </launchConfigurationType>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ configTypeID="my.etrice.generator.launch.launchConfigurationType"
+ icon="icons/derived-launch.gif"
+ id="my.etrice.generator.launch.launchConfigurationTypeImage">
+ </launchConfigurationTypeImage>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ class="my.etrice.generator.launch.DerivedGeneratorLaunchConfigurationTabGroup"
+ description="Tab Group for Derived Java Generator Launch Configurations"
+ id="my.etrice.generator.launch.launchConfigurationTabGroup"
+ type="my.etrice.generator.launch.launchConfigurationType">
+ </launchConfigurationTabGroup>
+ </extension>
+</plugin>
diff --git a/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorConfigTab.java b/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorConfigTab.java
new file mode 100644
index 000000000..de29673c9
--- /dev/null
+++ b/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorConfigTab.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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 my.etrice.generator.launch;
+
+import org.eclipse.etrice.generator.launch.java.JavaGeneratorConfigTab;
+
+/**
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class DerivedGeneratorConfigTab extends JavaGeneratorConfigTab {
+
+ /**
+ * EXAMPLE: override tab name
+ *
+ * @see org.eclipse.etrice.generator.launch.java.JavaGeneratorConfigTab#getName()
+ */
+ public String getName() {
+ return "Derived Java Generator";
+ }
+
+}
diff --git a/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationDelegate.java b/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationDelegate.java
new file mode 100644
index 000000000..0af585b3b
--- /dev/null
+++ b/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationDelegate.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * 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 my.etrice.generator.launch;
+
+import my.etrice.generator.DerivedGenerator;
+
+import org.eclipse.etrice.generator.base.ILineOutput;
+import org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationDelegate;
+
+/**
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class DerivedGeneratorLaunchConfigurationDelegate extends
+ JavaGeneratorLaunchConfigurationDelegate {
+
+ /**
+ * EXAMPLE: override console name
+ *
+ * @see org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationDelegate#getConsoleName()
+ */
+ protected String getConsoleName() {
+ return "Derived Java Generator Console";
+ }
+
+ /**
+ * call the main generator
+ *
+ * @see org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationDelegate#runGenerator(java.lang.String[], org.eclipse.etrice.generator.base.ILineOutput)
+ */
+ protected void runGenerator(String[] args, ILineOutput out) {
+ DerivedGenerator.setOutput(out);
+ DerivedGenerator.setTerminateOnError(false);
+ DerivedGenerator.main(args);
+ }
+
+}
diff --git a/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationTabGroup.java b/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationTabGroup.java
new file mode 100644
index 000000000..3fcdb3593
--- /dev/null
+++ b/examples/my.etrice.generator.launch/src/my/etrice/generator/launch/DerivedGeneratorLaunchConfigurationTabGroup.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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 my.etrice.generator.launch;
+
+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.debug.ui.RefreshTab;
+import org.eclipse.etrice.generator.launch.java.JavaGeneratorLaunchConfigurationTabGroup;
+import org.eclipse.etrice.generator.launch.java.JavaGeneratorMainTab;
+
+/**
+ * EXAMPLE: the tabs are assembled. All but one tab are re-used
+ *
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class DerivedGeneratorLaunchConfigurationTabGroup extends
+ JavaGeneratorLaunchConfigurationTabGroup {
+
+ @Override
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new JavaGeneratorMainTab(),
+ new DerivedGeneratorConfigTab(),
+ new RefreshTab(),
+ new EnvironmentTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+ }
+
+}
diff --git a/examples/my.etrice.generator/.classpath b/examples/my.etrice.generator/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/examples/my.etrice.generator/.classpath
@@ -0,0 +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>
diff --git a/examples/my.etrice.generator/.gitignore b/examples/my.etrice.generator/.gitignore
new file mode 100644
index 000000000..079929515
--- /dev/null
+++ b/examples/my.etrice.generator/.gitignore
@@ -0,0 +1,3 @@
+bin
+*._trace
+*.smap
diff --git a/examples/my.etrice.generator/.project b/examples/my.etrice.generator/.project
new file mode 100644
index 000000000..904b38444
--- /dev/null
+++ b/examples/my.etrice.generator/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>my.etrice.generator</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/examples/my.etrice.generator/.settings/org.eclipse.jdt.core.prefs b/examples/my.etrice.generator/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f287d53cf
--- /dev/null
+++ b/examples/my.etrice.generator/.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/examples/my.etrice.generator/META-INF/MANIFEST.MF b/examples/my.etrice.generator/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..29ddaace3
--- /dev/null
+++ b/examples/my.etrice.generator/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Derived Generator
+Bundle-SymbolicName: my.etrice.generator
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.etrice.generator;bundle-version="0.3.0",
+ org.eclipse.etrice.generator.java;bundle-version="0.3.0",
+ com.google.inject;bundle-version="3.0.0",
+ org.eclipse.etrice.core.room;bundle-version="0.3.0"
+Export-Package: my.etrice.generator
diff --git a/examples/my.etrice.generator/build.properties b/examples/my.etrice.generator/build.properties
new file mode 100644
index 000000000..41eb6ade2
--- /dev/null
+++ b/examples/my.etrice.generator/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/examples/my.etrice.generator/src/my/etrice/generator/DerivedGenerator.java b/examples/my.etrice.generator/src/my/etrice/generator/DerivedGenerator.java
new file mode 100644
index 000000000..034f91d18
--- /dev/null
+++ b/examples/my.etrice.generator/src/my/etrice/generator/DerivedGenerator.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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 my.etrice.generator;
+
+import my.etrice.generator.setup.DerivedGeneratorModule;
+
+import org.eclipse.etrice.generator.java.Main;
+
+/**
+ * EXAMPLE: just delegate to base class
+ *
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class DerivedGenerator extends Main {
+
+ public static void main(String[] args) {
+ int ret = createAndRunGenerator(new DerivedGeneratorModule(), args);
+ if (isTerminateOnError() && ret!=GENERATOR_OK)
+ System.exit(ret);
+ }
+}
diff --git a/examples/my.etrice.generator/src/my/etrice/generator/gen/DerivedTranslationProvider.java b/examples/my.etrice.generator/src/my/etrice/generator/gen/DerivedTranslationProvider.java
new file mode 100644
index 000000000..3f1bd9379
--- /dev/null
+++ b/examples/my.etrice.generator/src/my/etrice/generator/gen/DerivedTranslationProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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 my.etrice.generator.gen;
+
+import org.eclipse.etrice.core.room.DetailCode;
+import org.eclipse.etrice.generator.java.gen.JavaTranslationProvider;
+
+
+/**
+ * EXAMPLE: derive translation provider and just override the tags.
+ * Delegates to super.
+ * NOTE: not necessary in the minimal version.
+ *
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class DerivedTranslationProvider extends JavaTranslationProvider {
+
+ public String translateTag(String tag, DetailCode code) {
+ if (tag.equals("Derived"))
+ return "DerivedReplacement";
+
+ return super.translateTag(tag, code);
+ }
+}
diff --git a/examples/my.etrice.generator/src/my/etrice/generator/setup/DerivedGeneratorModule.java b/examples/my.etrice.generator/src/my/etrice/generator/setup/DerivedGeneratorModule.java
new file mode 100644
index 000000000..af71bf759
--- /dev/null
+++ b/examples/my.etrice.generator/src/my/etrice/generator/setup/DerivedGeneratorModule.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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 my.etrice.generator.setup;
+
+import my.etrice.generator.DerivedGenerator;
+import my.etrice.generator.gen.DerivedTranslationProvider;
+
+import org.eclipse.etrice.generator.base.ITranslationProvider;
+import org.eclipse.etrice.generator.java.Main;
+import org.eclipse.etrice.generator.java.setup.GeneratorModule;
+
+import com.google.inject.Binder;
+
+/**
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class DerivedGeneratorModule extends GeneratorModule {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.etrice.generator.java.setup.GeneratorModule#configure(com.google.inject.Binder)
+ */
+ @Override
+ public void configure(Binder binder) {
+ // EXAMPLE: invoke base class configuration
+ super.configure(binder);
+
+ // EXAMPLE: override already bound AbstractGenerator -> Main
+ binder.bind(Main.class).to(DerivedGenerator.class);
+ }
+
+ /**
+ * EXAMPLE: override the translation provider
+ * NOTE: in the minimal setting not necessary
+ *
+ * @see org.eclipse.etrice.generator.java.setup.GeneratorModule#bindITranslationProvider()
+ */
+ @Override
+ public Class<? extends ITranslationProvider> bindITranslationProvider() {
+ return DerivedTranslationProvider.class;
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
index e8f688373..242c05614 100644
--- a/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.java/META-INF/MANIFEST.MF
@@ -21,4 +21,7 @@ Require-Bundle: org.eclipse.etrice.core.room.ui;bundle-version="0.3.0",
org.eclipse.xtext.util;bundle-version="2.1.1"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.etrice.generator.java
+Export-Package: org.eclipse.etrice.generator.java,
+ org.eclipse.etrice.generator.java.gen,
+ org.eclipse.etrice.generator.java.newwizard,
+ org.eclipse.etrice.generator.java.setup
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 5a3d20844..4281b2b55 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
@@ -19,3 +19,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.jdt.launching,
org.eclipse.ui.dialogs
Bundle-Vendor: eTrice (Incubation)
+Export-Package: org.eclipse.etrice.generator.launch.java

Back to the top