/plugins/grooveclipse/org.grooveclipse.analyze.tracedsl/src-gen/org/grooveclipse/analyze/TraceDslStandaloneSetupGenerated.java
http://grooveclipse.googlecode.com/ · Java · 52 lines · 34 code · 14 blank · 4 comment · 4 complexity · 29b7cec6bb0c7e5f9e33b682dcb4f2f9 MD5 · raw file
- package org.grooveclipse.analyze;
- import org.eclipse.emf.ecore.EPackage;
- import org.eclipse.xtext.ISetup;
- import org.eclipse.emf.ecore.resource.Resource;
- import com.google.inject.Guice;
- import com.google.inject.Injector;
- /**
- * Generated from StandaloneSetup.xpt!
- */
- @SuppressWarnings("all")
- public class TraceDslStandaloneSetupGenerated implements ISetup {
- public Injector createInjectorAndDoEMFRegistration() {
- // register default ePackages
- if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
- "ecore", new org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl());
- if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
- "xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());
- if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
- EPackage.Registry.INSTANCE.put(org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);
- Injector injector = createInjector();
- register(injector);
- return injector;
- }
-
- public Injector createInjector() {
- return Guice.createInjector(new org.grooveclipse.analyze.TraceDslRuntimeModule());
- }
-
- public void register(Injector injector) {
- if (!EPackage.Registry.INSTANCE.containsKey("http://www.grooveclipse.org/analyze/TraceDsl")) {
- EPackage.Registry.INSTANCE.put("http://www.grooveclipse.org/analyze/TraceDsl", org.grooveclipse.analyze.traceDsl.TraceDslPackage.eINSTANCE);
- }
- org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
- org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("trace", resourceFactory);
- org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("trace", serviceProvider);
-
- }
- }