Skip to content

Commit

Permalink
fix sebastianbenz#27: export XbaseWithRichstrings in StandaloneSetups
Browse files Browse the repository at this point in the history
  • Loading branch information
riederm committed Jun 13, 2017
1 parent ce10159 commit 33b97b1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,7 +23,7 @@ public List<Injector> createInjectorAndDoEMFRegistration() {
return injectors;

List<Injector> injectors = new ArrayList<Injector>();
XbaseWithAnnotationsStandaloneSetup.doSetup();
XbaseWithRichstringStandaloneSetup.doSetup();

injectors.add(registerFeature());
injectors.add(registerSpec());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
}
}

0 comments on commit 33b97b1

Please sign in to comment.