summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Zarnekow2013-11-28 12:03:49 (EST)
committerDennis Huebner2013-12-05 08:55:19 (EST)
commitc5ce18de15c5df4fc7d83d24328f58cbd3e90d77 (patch)
tree876a494e51dba44416cab4fec3bbb230b85b62e4
parente0ae61028728b494a3cc934012a726ce8097924b (diff)
downloadorg.eclipse.emf-c5ce18de15c5df4fc7d83d24328f58cbd3e90d77.zip
org.eclipse.emf-c5ce18de15c5df4fc7d83d24328f58cbd3e90d77.tar.gz
org.eclipse.emf-c5ce18de15c5df4fc7d83d24328f58cbd3e90d77.tar.bz2
Make GenModelSupport available from mvn pluginrefs/changes/74/19374/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 c15f50c..d1f92d3 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;
+ }
+
}