SmachDSLStandaloneSetupGenerated.java
Go to the documentation of this file.
00001 
00002 package org.best.of.robotics;
00003 
00004 import org.eclipse.emf.ecore.EPackage;
00005 import org.eclipse.xtext.ISetup;
00006 import org.eclipse.emf.ecore.resource.Resource;
00007 
00008 import com.google.inject.Guice;
00009 import com.google.inject.Injector;
00010 
00014 @SuppressWarnings("all")
00015 public class SmachDSLStandaloneSetupGenerated implements ISetup {
00016 
00017         public Injector createInjectorAndDoEMFRegistration() {
00018                 org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
00019 
00020                 Injector injector = createInjector();
00021                 register(injector);
00022                 return injector;
00023         }
00024         
00025         public Injector createInjector() {
00026                 return Guice.createInjector(new org.best.of.robotics.SmachDSLRuntimeModule());
00027         }
00028         
00029         public void register(Injector injector) {
00030         if (!EPackage.Registry.INSTANCE.containsKey("http://www.best.org/of/robotics/SmachDSL")) {
00031                 EPackage.Registry.INSTANCE.put("http://www.best.org/of/robotics/SmachDSL", org.best.of.robotics.smachDSL.SmachDSLPackage.eINSTANCE);
00032         }
00033 
00034                 org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
00035                 org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
00036                 Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("smach_model", resourceFactory);
00037                 org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("smach_model", serviceProvider);
00038                 
00039 
00040 
00041 
00042         }
00043 }


bride_plugin_source
Author(s): Alexander Bubeck
autogenerated on Sun Oct 5 2014 22:38:34