org.eclipse.xtext.XtextStandaloneSetupGenerated Maven / Gradle / Ivy
package org.eclipse.xtext;
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 XtextStandaloneSetupGenerated 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.eclipse.xtext.XtextRuntimeModule());
}
public void register(Injector injector) {
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("xtext", resourceFactory);
org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext", serviceProvider);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext2", resourceFactory);
org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("xtext2", serviceProvider);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy