From 33b97b1f4d45c62d785e9d3cac2819a7f3653ed5 Mon Sep 17 00:00:00 2001 From: Mathias Rieder Date: Tue, 13 Jun 2017 20:57:42 +0200 Subject: [PATCH] fix #27: export XbaseWithRichstrings in StandaloneSetups --- .../org/jnario/maven/JnarioMavenStandaloneSetup.java | 4 ++-- .../org/jnario/feature/FeatureStandaloneSetup.java | 2 ++ .../src/org/jnario/spec/SpecStandaloneSetup.java | 2 ++ .../XbaseWithRichstringStandaloneSetup.java | 12 ++++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/plugins/jnario-maven-plugin/src/main/java/org/jnario/maven/JnarioMavenStandaloneSetup.java b/plugins/jnario-maven-plugin/src/main/java/org/jnario/maven/JnarioMavenStandaloneSetup.java index b66c0042d..48c9dd3c0 100644 --- a/plugins/jnario-maven-plugin/src/main/java/org/jnario/maven/JnarioMavenStandaloneSetup.java +++ b/plugins/jnario-maven-plugin/src/main/java/org/jnario/maven/JnarioMavenStandaloneSetup.java @@ -3,13 +3,13 @@ import java.util.List; import org.eclipse.emf.ecore.EPackage; -import org.eclipse.xtext.xbase.annotations.XbaseWithAnnotationsStandaloneSetup; import org.jnario.feature.FeatureStandaloneSetupGenerated; import org.jnario.feature.feature.FeaturePackage; import org.jnario.spec.SpecStandaloneSetupGenerated; import org.jnario.spec.spec.SpecPackage; import org.jnario.suite.SuiteStandaloneSetupGenerated; import org.jnario.suite.suite.SuitePackage; +import org.jnario.xbase.richstring.XbaseWithRichstringStandaloneSetup; import com.google.inject.Guice; import com.google.inject.Injector; @@ -23,7 +23,7 @@ public List createInjectorAndDoEMFRegistration() { return injectors; List injectors = new ArrayList(); - XbaseWithAnnotationsStandaloneSetup.doSetup(); + XbaseWithRichstringStandaloneSetup.doSetup(); injectors.add(registerFeature()); injectors.add(registerSpec()); diff --git a/plugins/org.jnario.feature/src/org/jnario/feature/FeatureStandaloneSetup.java b/plugins/org.jnario.feature/src/org/jnario/feature/FeatureStandaloneSetup.java index 911d551df..b7239cfb4 100755 --- a/plugins/org.jnario.feature/src/org/jnario/feature/FeatureStandaloneSetup.java +++ b/plugins/org.jnario.feature/src/org/jnario/feature/FeatureStandaloneSetup.java @@ -12,6 +12,7 @@ import org.eclipse.xtext.xbase.annotations.xAnnotations.XAnnotationsPackage; import org.jnario.JnarioPackage; import org.jnario.feature.feature.FeaturePackage; +import org.jnario.xbase.richstring.xbasewithrichstring.XbaseWithRichstringPackage; import com.google.inject.Injector; @@ -27,6 +28,7 @@ public static void doSetup() { @Override public Injector createInjectorAndDoEMFRegistration() { EPackage.Registry.INSTANCE.put(XAnnotationsPackage.eINSTANCE.getNsURI(),XAnnotationsPackage.eINSTANCE); + EPackage.Registry.INSTANCE.put(XbaseWithRichstringPackage.eNS_URI, XbaseWithRichstringPackage.eINSTANCE); EPackage.Registry.INSTANCE.put(JnarioPackage.eNS_URI, JnarioPackage.eINSTANCE); EPackage.Registry.INSTANCE.put(FeaturePackage.eNS_URI, FeaturePackage.eINSTANCE); return super.createInjectorAndDoEMFRegistration(); diff --git a/plugins/org.jnario.spec/src/org/jnario/spec/SpecStandaloneSetup.java b/plugins/org.jnario.spec/src/org/jnario/spec/SpecStandaloneSetup.java index c5435d554..8d32e5880 100755 --- a/plugins/org.jnario.spec/src/org/jnario/spec/SpecStandaloneSetup.java +++ b/plugins/org.jnario.spec/src/org/jnario/spec/SpecStandaloneSetup.java @@ -11,6 +11,7 @@ import org.eclipse.emf.ecore.EPackage; import org.jnario.JnarioPackage; import org.jnario.spec.spec.SpecPackage; +import org.jnario.xbase.richstring.xbasewithrichstring.XbaseWithRichstringPackage; import com.google.inject.Injector; @@ -26,6 +27,7 @@ public static void doSetup() { @Override public Injector createInjectorAndDoEMFRegistration() { + EPackage.Registry.INSTANCE.put(XbaseWithRichstringPackage.eNS_URI, XbaseWithRichstringPackage.eINSTANCE); EPackage.Registry.INSTANCE.put(JnarioPackage.eNS_URI, JnarioPackage.eINSTANCE); EPackage.Registry.INSTANCE.put(SpecPackage.eNS_URI, SpecPackage.eINSTANCE); return super.createInjectorAndDoEMFRegistration(); diff --git a/plugins/org.jnario.xbase.richstring/src/org/jnario/xbase/richstring/XbaseWithRichstringStandaloneSetup.java b/plugins/org.jnario.xbase.richstring/src/org/jnario/xbase/richstring/XbaseWithRichstringStandaloneSetup.java index 84905efeb..cf30185a4 100644 --- a/plugins/org.jnario.xbase.richstring/src/org/jnario/xbase/richstring/XbaseWithRichstringStandaloneSetup.java +++ b/plugins/org.jnario.xbase.richstring/src/org/jnario/xbase/richstring/XbaseWithRichstringStandaloneSetup.java @@ -3,6 +3,11 @@ */ package org.jnario.xbase.richstring; +import org.eclipse.emf.ecore.EPackage; +import org.jnario.xbase.richstring.xbasewithrichstring.XbaseWithRichstringPackage; + +import com.google.inject.Injector; + /** * Initialization support for running Xtext languages * without equinox extension registry @@ -12,5 +17,12 @@ public class XbaseWithRichstringStandaloneSetup extends XbaseWithRichstringStand public static void doSetup() { new XbaseWithRichstringStandaloneSetup().createInjectorAndDoEMFRegistration(); } + + + @Override + public Injector createInjectorAndDoEMFRegistration() { + EPackage.Registry.INSTANCE.put(XbaseWithRichstringPackage.eNS_URI, XbaseWithRichstringPackage.eINSTANCE); + return super.createInjectorAndDoEMFRegistration(); + } }