Search in sources :

Example 31 with XMIResourceFactoryImpl

use of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl in project xtext-core by eclipse.

the class Bug301935TestLanguageStandaloneSetupGenerated method createInjectorAndDoEMFRegistration.

@Override
public Injector createInjectorAndDoEMFRegistration() {
    // register default ePackages
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtextbin", new BinaryGrammarResourceFactoryImpl());
    if (!EPackage.Registry.INSTANCE.containsKey(XtextPackage.eNS_URI))
        EPackage.Registry.INSTANCE.put(XtextPackage.eNS_URI, XtextPackage.eINSTANCE);
    Injector injector = createInjector();
    register(injector);
    return injector;
}
Also used : EcoreResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl) Injector(com.google.inject.Injector) XMIResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl) BinaryGrammarResourceFactoryImpl(org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl)

Example 32 with XMIResourceFactoryImpl

use of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl in project xtext-core by eclipse.

the class ClassloaderClasspathUriResolverTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    _resolver = new ClassloaderClasspathUriResolver();
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new XMIResourceFactoryImpl());
}
Also used : XMIResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl) Before(org.junit.Before)

Example 33 with XMIResourceFactoryImpl

use of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl in project xtext-core by eclipse.

the class IndentationAwareTestLanguageStandaloneSetupGenerated method createInjectorAndDoEMFRegistration.

@Override
public Injector createInjectorAndDoEMFRegistration() {
    // register default ePackages
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtextbin", new BinaryGrammarResourceFactoryImpl());
    if (!EPackage.Registry.INSTANCE.containsKey(XtextPackage.eNS_URI))
        EPackage.Registry.INSTANCE.put(XtextPackage.eNS_URI, XtextPackage.eINSTANCE);
    Injector injector = createInjector();
    register(injector);
    return injector;
}
Also used : EcoreResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl) Injector(com.google.inject.Injector) XMIResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl) BinaryGrammarResourceFactoryImpl(org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl)

Example 34 with XMIResourceFactoryImpl

use of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl in project xtext-core by eclipse.

the class TerminalsStandaloneSetupGenerated method createInjectorAndDoEMFRegistration.

@Override
public Injector createInjectorAndDoEMFRegistration() {
    // register default ePackages
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtextbin", new BinaryGrammarResourceFactoryImpl());
    if (!EPackage.Registry.INSTANCE.containsKey(XtextPackage.eNS_URI))
        EPackage.Registry.INSTANCE.put(XtextPackage.eNS_URI, XtextPackage.eINSTANCE);
    Injector injector = createInjector();
    register(injector);
    return injector;
}
Also used : EcoreResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl) Injector(com.google.inject.Injector) XMIResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl) BinaryGrammarResourceFactoryImpl(org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl)

Example 35 with XMIResourceFactoryImpl

use of org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl in project xtext-eclipse by eclipse.

the class EncodingUiTestLanguageStandaloneSetupGenerated method createInjectorAndDoEMFRegistration.

@Override
public Injector createInjectorAndDoEMFRegistration() {
    // register default ePackages
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
    if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xtextbin", new BinaryGrammarResourceFactoryImpl());
    if (!EPackage.Registry.INSTANCE.containsKey(XtextPackage.eNS_URI))
        EPackage.Registry.INSTANCE.put(XtextPackage.eNS_URI, XtextPackage.eINSTANCE);
    Injector injector = createInjector();
    register(injector);
    return injector;
}
Also used : EcoreResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl) Injector(com.google.inject.Injector) XMIResourceFactoryImpl(org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl) BinaryGrammarResourceFactoryImpl(org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl)

Aggregations

XMIResourceFactoryImpl (org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl)50 Injector (com.google.inject.Injector)20 EcoreResourceFactoryImpl (org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl)20 BinaryGrammarResourceFactoryImpl (org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl)20 Resource (org.eclipse.emf.ecore.resource.Resource)19 ResourceSetImpl (org.eclipse.emf.ecore.resource.impl.ResourceSetImpl)18 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)15 IOException (java.io.IOException)12 EObject (org.eclipse.emf.ecore.EObject)11 URI (org.eclipse.emf.common.util.URI)10 File (java.io.File)4 FSM (org.softlang.metalib.emf.fsml.fsml.FSM)3 MelangeResourceFactoryImpl (fr.inria.diverse.melange.resource.MelangeResourceFactoryImpl)2 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 Decisions (org.benchmarx.examples.familiestopersons.testsuite.Decisions)2 Diagnostic (org.eclipse.emf.common.util.Diagnostic)2 EPackage (org.eclipse.emf.ecore.EPackage)2 MappingModel (org.eclipse.vorto.core.api.model.mapping.MappingModel)2 LoggerFactory (org.slf4j.LoggerFactory)2