/plugins/grooveclipse/org.grooveclipse.infrastructure.dsl/src-gen/org/grooveclipse/infrastructure/dsl/InfrastructureDslStandaloneSetupGenerated.java
http://grooveclipse.googlecode.com/ · Java · 44 lines · 27 code · 14 blank · 3 comment · 1 complexity · 307262a3563affbb2df1e7a10379938a MD5 · raw file
- package org.grooveclipse.infrastructure.dsl;
- 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 InfrastructureDslStandaloneSetupGenerated implements ISetup {
- public Injector createInjectorAndDoEMFRegistration() {
- org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
- Injector injector = createInjector();
- register(injector);
- return injector;
- }
-
- public Injector createInjector() {
- return Guice.createInjector(new org.grooveclipse.infrastructure.dsl.InfrastructureDslRuntimeModule());
- }
-
- public void register(Injector injector) {
- if (!EPackage.Registry.INSTANCE.containsKey("http://www.grooveclipse.org/infrastructure/dsl/InfrastructureDsl")) {
- EPackage.Registry.INSTANCE.put("http://www.grooveclipse.org/infrastructure/dsl/InfrastructureDsl", org.grooveclipse.infrastructure.dsl.infrastructureDsl.InfrastructureDslPackage.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("infrastruct", resourceFactory);
- org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("infrastruct", serviceProvider);
-
- }
- }