public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.bme.hu/mit/inf/gomrp/statemachine/dsl/text/StateMachineDSL")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.bme.hu/mit/inf/gomrp/statemachine/dsl/text/StateMachineDSL",
          hu.bme
              .mit
              .inf
              .gomrp
              .statemachine
              .dsl
              .text
              .stateMachineDSL
              .StateMachineDSLPackage
              .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("smbm", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("smbm", serviceProvider);
  }
  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("eobjectatoffsettestlanguage", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("eobjectatoffsettestlanguage", serviceProvider);

    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.xtext.org/EObjectAtOffsetTestLanguage")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.xtext.org/EObjectAtOffsetTestLanguage",
          org.eclipse
              .xtext
              .resource
              .eObjectAtOffsetTestLanguage
              .EObjectAtOffsetTestLanguagePackage
              .eINSTANCE);
    }
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.eclipse.org/2011/xtext/idea/ui/common/types/xtext/ui/Refactoring")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.eclipse.org/2011/xtext/idea/ui/common/types/xtext/ui/Refactoring",
          org.eclipse
              .xtext
              .idea
              .common
              .types
              .refactoringTestLanguage
              .RefactoringTestLanguagePackage
              .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("ideaTypesRefactoring", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("ideaTypesRefactoring", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/builddsl")) {
      EPackage.Registry.INSTANCE.put("http://www.xtext.org/builddsl", BuildPackage.eINSTANCE);
    }
    IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
    IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);

    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("build", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("build", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.ExprDemo.expr")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.ExprDemo.expr", expr.exprDemo.ExprDemoPackage.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("expr", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("expr", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.bundleDsl.com/BundleDsl")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.bundleDsl.com/BundleDsl", com.bundleDsl.bundleDsl.BundleDslPackage.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("bdsl", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("bdsl", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.caltoopia.org/frontend/Cal")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.caltoopia.org/frontend/Cal", org.caltoopia.frontend.cal.CalPackage.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("cal", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("cal", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.scribble.org/editor/dsl/ScribbleDsl")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.scribble.org/editor/dsl/ScribbleDsl",
          org.scribble.editor.dsl.scribbleDsl.ScribbleDslPackage.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("scr", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("scr", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://lig.imag.fr/dsl/ExSchema")) {
      EPackage.Registry.INSTANCE.put(
          "http://lig.imag.fr/dsl/ExSchema",
          fr.imag.exschema.xtext.exSchema.ExSchemaPackage.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("exschema", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("exschema", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/papyrus/alf/Alf")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.eclipse.org/papyrus/alf/Alf",
          org.eclipse.papyrus.uml.alf.alf.AlfPackage.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("alf", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("alf", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.example.org/domainmodel/Domainmodel")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.example.org/domainmodel/Domainmodel",
          org.example.domainmodel.domainmodel.DomainmodelPackage.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("dmdl", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("dmdl", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.bestsolution.at/efxclipse/tooling/decora/DecoraDsl")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.bestsolution.at/efxclipse/tooling/decora/DecoraDsl",
          at.bestsolution.efxclipse.tooling.decora.decoraDsl.DecoraDslPackage.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("jsl", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("jsl", serviceProvider);
  }
  public Injector createInjectorAndDoEMFRegistration() {
    // register default ePackages
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
      Resource.Factory.Registry.INSTANCE
          .getExtensionToFactoryMap()
          .put("ecore", new org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
      Resource.Factory.Registry.INSTANCE
          .getExtensionToFactoryMap()
          .put("xmi", new org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl());
    if (!EPackage.Registry.INSTANCE.containsKey(org.eclipse.xtext.XtextPackage.eNS_URI))
      EPackage.Registry.INSTANCE.put(
          org.eclipse.xtext.XtextPackage.eNS_URI, org.eclipse.xtext.XtextPackage.eINSTANCE);

    Injector injector = createInjector();
    register(injector);
    return injector;
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.xtext.org/example/statemachine/Statemachine")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.xtext.org/example/statemachine/Statemachine",
          org.xtext.example.statemachine.statemachine.StatemachinePackage.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("statemachine", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("statemachine", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.eclipse.org/2010/tmf/xtext/parser/EncodingUiTest")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.eclipse.org/2010/tmf/xtext/parser/EncodingUiTest",
          org.eclipse.xtext.ui.tests.editor.encoding.encodingTest.EncodingTestPackage.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("encodinguitestlanguage", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("encodinguitestlanguage", serviceProvider);
  }
  public void register(Injector injector) {
    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.eclipse.org/papyrus/property/editor/xtext/UmlProperty")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.eclipse.org/papyrus/property/editor/xtext/UmlProperty",
          org.eclipse.papyrus.property.editor.xtext.umlProperty.UmlPropertyPackage.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("umlproperty", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("umlproperty", serviceProvider);
  }
  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("subtestlanguage", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("subtestlanguage", serviceProvider);

    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.eclipse.org/2009/tmf/xtext/SubTestLanguage")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.eclipse.org/2009/tmf/xtext/SubTestLanguage",
          org.eclipse.xtext.generator.ecore.subPackage.SubPackagePackage.eINSTANCE);
    }
  }
  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("bug299395testlanguage", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("bug299395testlanguage", serviceProvider);

    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://www.eclipse.org/2010/tmf/xtext/Bug299395")) {
      EPackage.Registry.INSTANCE.put(
          "http://www.eclipse.org/2010/tmf/xtext/Bug299395",
          org.eclipse.xtext.parsetree.reconstr.bug299395.Bug299395Package.eINSTANCE);
    }
  }
  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("ignorecaseimportstestlanguage", resourceFactory);
    org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE
        .getExtensionToFactoryMap()
        .put("ignorecaseimportstestlanguage", serviceProvider);

    if (!EPackage.Registry.INSTANCE.containsKey(
        "http://eclipse.org/xtext/ignoreCaseImportsTestLanguage")) {
      EPackage.Registry.INSTANCE.put(
          "http://eclipse.org/xtext/ignoreCaseImportsTestLanguage",
          org.eclipse.xtext.linking.ignoreCaseImportsTest.IgnoreCaseImportsTestPackage.eINSTANCE);
    }
  }
 public static void preRegisterPackage(String nsPrefix, EPackage.Descriptor descriptor) {
   if (!EPackage.Registry.INSTANCE.containsKey(nsPrefix))
     EPackage.Registry.INSTANCE.put(nsPrefix, descriptor);
 }