2021-11-30 17:25:45 +00:00
|
|
|
/*
|
|
|
|
* generated by Xtext 2.23.0
|
|
|
|
*/
|
2021-12-03 07:37:31 +00:00
|
|
|
package fr.n7;
|
2021-11-30 17:25:45 +00:00
|
|
|
|
|
|
|
import com.google.inject.Guice;
|
|
|
|
import com.google.inject.Injector;
|
2021-12-03 08:38:29 +00:00
|
|
|
import fr.n7.gAME.GAMEPackage;
|
2021-11-30 17:25:45 +00:00
|
|
|
import org.eclipse.emf.ecore.EPackage;
|
|
|
|
import org.eclipse.emf.ecore.resource.Resource;
|
|
|
|
import org.eclipse.xtext.ISetup;
|
|
|
|
import org.eclipse.xtext.common.TerminalsStandaloneSetup;
|
|
|
|
import org.eclipse.xtext.resource.IResourceFactory;
|
|
|
|
import org.eclipse.xtext.resource.IResourceServiceProvider;
|
|
|
|
|
|
|
|
@SuppressWarnings("all")
|
2021-12-03 07:37:31 +00:00
|
|
|
public class GAMEStandaloneSetupGenerated implements ISetup {
|
2021-11-30 17:25:45 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public Injector createInjectorAndDoEMFRegistration() {
|
|
|
|
TerminalsStandaloneSetup.doSetup();
|
|
|
|
|
|
|
|
Injector injector = createInjector();
|
|
|
|
register(injector);
|
|
|
|
return injector;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Injector createInjector() {
|
2021-12-03 07:37:31 +00:00
|
|
|
return Guice.createInjector(new GAMERuntimeModule());
|
2021-11-30 17:25:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void register(Injector injector) {
|
2021-12-03 08:38:29 +00:00
|
|
|
if (!EPackage.Registry.INSTANCE.containsKey("http://www.n7.fr/GAME")) {
|
|
|
|
EPackage.Registry.INSTANCE.put("http://www.n7.fr/GAME", GAMEPackage.eINSTANCE);
|
2021-11-30 17:25:45 +00:00
|
|
|
}
|
|
|
|
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
|
|
|
|
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
|
|
|
|
|
|
|
|
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("game", resourceFactory);
|
|
|
|
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("game", serviceProvider);
|
|
|
|
}
|
|
|
|
}
|