/alpha/com.ironglass.hdlforge/src-gen/com/ironglass/hdlforge/SystemVerilogStandaloneSetupGenerated.java
http://hdl-forge.googlecode.com/ · Java · 44 lines · 27 code · 14 blank · 3 comment · 1 complexity · 72935e3fd99ce37014b7cd856dc2c0c5 MD5 · raw file
- package com.ironglass.hdlforge;
- 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 SystemVerilogStandaloneSetupGenerated 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 com.ironglass.hdlforge.SystemVerilogRuntimeModule());
- }
-
- public void register(Injector injector) {
- if (!EPackage.Registry.INSTANCE.containsKey("http://www.ironglass.com/hdlforge/SystemVerilog")) {
- EPackage.Registry.INSTANCE.put("http://www.ironglass.com/hdlforge/SystemVerilog", com.ironglass.hdlforge.systemVerilog.SystemVerilogPackage.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("sv", resourceFactory);
- org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("sv", serviceProvider);
-
- }
- }