Search in sources :

Example 36 with IResourceFactory

use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.

the class UnorderedGroupsTestLanguageStandaloneSetupGenerated method register.

public void register(Injector injector) {
    IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
    IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("unorderedgroupstestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("unorderedgroupstestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2010/tmf/xtext/UnorderedGroupsTestLanguage")) {
        EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2010/tmf/xtext/UnorderedGroupsTestLanguage", UnorderedGroupsTestLanguagePackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 37 with IResourceFactory

use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.

the class CommentAssociationTestLanguageStandaloneSetupGenerated method register.

public void register(Injector injector) {
    IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
    IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("commentassociationtestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("commentassociationtestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/tests/CommentAssociation")) {
        EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/tests/CommentAssociation", CommentAssociationPackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 38 with IResourceFactory

use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.

the class Bug302128TestLanguageStandaloneSetupGenerated method register.

public void register(Injector injector) {
    IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
    IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug302128testlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug302128testlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/tests/bug302123")) {
        EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/tests/bug302123", Bug302128Package.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 39 with IResourceFactory

use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.

the class SerializationErrorTestLanguageStandaloneSetupGenerated method register.

public void register(Injector injector) {
    IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
    IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("serializationerrortestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("serializationerrortestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/serializationerror")) {
        EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/serializationerror", SerializationerrorPackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 40 with IResourceFactory

use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.

the class FormatterTestLanguageStandaloneSetupGenerated method register.

public void register(Injector injector) {
    IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
    IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
    Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("formattertestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("formattertestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://simple/formattertestlanguage")) {
        EPackage.Registry.INSTANCE.put("http://simple/formattertestlanguage", FormattertestlanguagePackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Aggregations

IResourceFactory (org.eclipse.xtext.resource.IResourceFactory)121 IResourceServiceProvider (org.eclipse.xtext.resource.IResourceServiceProvider)119 Injector (com.google.inject.Injector)2 Binder (com.google.inject.Binder)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 WorkflowContextDefaultImpl (org.eclipse.emf.mwe.core.WorkflowContextDefaultImpl)1 IssuesImpl (org.eclipse.emf.mwe.core.issues.IssuesImpl)1 NullProgressMonitor (org.eclipse.emf.mwe.core.monitor.NullProgressMonitor)1 Grammar (org.eclipse.xtext.Grammar)1 XtextStandaloneSetup (org.eclipse.xtext.XtextStandaloneSetup)1 FileExtensionProvider (org.eclipse.xtext.resource.FileExtensionProvider)1 XtextResource (org.eclipse.xtext.resource.XtextResource)1 Test (org.junit.Test)1