summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Zarnekow2013-11-28 12:03:49 (EST)
committerSebastian Zarnekow2013-11-28 12:04:05 (EST)
commit5c2f649dabebb59f87d17ca7fe984c7da27fd090 (patch)
tree7be3c51e7841fd3181b54aeae9b4d1c9469aa272
parentf2fedb9d9e828191bdbc6b9ac364d97028e7100f (diff)
downloadorg.eclipse.emf-5c2f649dabebb59f87d17ca7fe984c7da27fd090.zip
org.eclipse.emf-5c2f649dabebb59f87d17ca7fe984c7da27fd090.tar.gz
org.eclipse.emf-5c2f649dabebb59f87d17ca7fe984c7da27fd090.tar.bz2
Make GenModelSupport available from mvn pluginrefs/changes/77/19077/1
Signed-off-by: Sebastian Zarnekow <Sebastian.Zarnekow@itemis.de>
-rw-r--r--features/org.eclipse.emf.ecore.xcore-feature/pom.xml5
-rw-r--r--plugins/org.eclipse.emf.codegen.ecore.xtext/src/org/eclipse/emf/codegen/ecore/xtext/GenModelSupport.java13
2 files changed, 17 insertions, 1 deletions
diff --git a/features/org.eclipse.emf.ecore.xcore-feature/pom.xml b/features/org.eclipse.emf.ecore.xcore-feature/pom.xml
index 0bcdbf6..10580fa 100644
--- a/features/org.eclipse.emf.ecore.xcore-feature/pom.xml
+++ b/features/org.eclipse.emf.ecore.xcore-feature/pom.xml
@@ -27,6 +27,11 @@
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>model</directory>
+ </resource>
+ </resources>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
diff --git a/plugins/org.eclipse.emf.codegen.ecore.xtext/src/org/eclipse/emf/codegen/ecore/xtext/GenModelSupport.java b/plugins/org.eclipse.emf.codegen.ecore.xtext/src/org/eclipse/emf/codegen/ecore/xtext/GenModelSupport.java
index 3492c49..52a9c52 100644
--- a/plugins/org.eclipse.emf.codegen.ecore.xtext/src/org/eclipse/emf/codegen/ecore/xtext/GenModelSupport.java
+++ b/plugins/org.eclipse.emf.codegen.ecore.xtext/src/org/eclipse/emf/codegen/ecore/xtext/GenModelSupport.java
@@ -8,8 +8,11 @@
package org.eclipse.emf.codegen.ecore.xtext;
+import org.eclipse.xtext.ISetup;
import org.eclipse.xtext.resource.generic.AbstractGenericResourceSupport;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
import com.google.inject.Module;
@@ -37,11 +40,19 @@ import com.google.inject.Module;
*
* @author Sven Efftinge - Initial contribution and API
*/
-public class GenModelSupport extends AbstractGenericResourceSupport
+public class GenModelSupport extends AbstractGenericResourceSupport implements ISetup
{
@Override
protected Module createGuiceModule()
{
return new GenModelRuntimeModule();
}
+
+ public Injector createInjectorAndDoEMFRegistration() {
+ Injector injector = Guice.createInjector(getGuiceModule());
+ injector.injectMembers(this);
+ registerInRegistry(false);
+ return injector;
+ }
+
}