Search in sources :

Example 76 with IResourceServiceProvider

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

the class IgnoreCaseNamespacesTestLanguageStandaloneSetupGenerated 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("ignorecasenamespacestestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("ignorecasenamespacestestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/ignoreCaseNamespacesTestLanguage")) {
        EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/ignoreCaseNamespacesTestLanguage", IgnoreCaseNamespacesTestPackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 77 with IResourceServiceProvider

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

the class IndentationAwareTestLanguageStandaloneSetupGenerated 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("indentationawaretestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("indentationawaretestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://example.xtext.org/IndentationAwareTestLanguage")) {
        EPackage.Registry.INSTANCE.put("http://example.xtext.org/IndentationAwareTestLanguage", IndentLangPackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 78 with IResourceServiceProvider

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

the class MultiValueFeatureTestLanguageStandaloneSetupGenerated 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("multivaluefeaturetestlanguage", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("multivaluefeaturetestlanguage", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2008/xtext/MultiValueFeatureTestLanguage")) {
        EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2008/xtext/MultiValueFeatureTestLanguage", MultiValueFeatureTestLanguagePackage.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 79 with IResourceServiceProvider

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

the class FormatterTestLanguage2StandaloneSetupGenerated 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("formattertestlanguage2", resourceFactory);
    IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("formattertestlanguage2", serviceProvider);
    if (!EPackage.Registry.INSTANCE.containsKey("http://simple/formattertestlanguage2")) {
        EPackage.Registry.INSTANCE.put("http://simple/formattertestlanguage2", Formattertestlanguage2Package.eINSTANCE);
    }
}
Also used : IResourceServiceProvider(org.eclipse.xtext.resource.IResourceServiceProvider) IResourceFactory(org.eclipse.xtext.resource.IResourceFactory)

Example 80 with IResourceServiceProvider

use of org.eclipse.xtext.resource.IResourceServiceProvider 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

IResourceServiceProvider (org.eclipse.xtext.resource.IResourceServiceProvider)267 IResourceFactory (org.eclipse.xtext.resource.IResourceFactory)190 URI (org.eclipse.emf.common.util.URI)25 Resource (org.eclipse.emf.ecore.resource.Resource)21 IResourceDescription (org.eclipse.xtext.resource.IResourceDescription)20 XtextResource (org.eclipse.xtext.resource.XtextResource)13 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)10 ArrayList (java.util.ArrayList)7 List (java.util.List)7 Map (java.util.Map)5 IResource (org.eclipse.core.resources.IResource)5 EObject (org.eclipse.emf.ecore.EObject)5 Manager (org.eclipse.xtext.resource.IResourceDescription.Manager)5 Issue (org.eclipse.xtext.validation.Issue)5 Injector (com.google.inject.Injector)4 IProject (org.eclipse.core.resources.IProject)4 SubMonitor (org.eclipse.core.runtime.SubMonitor)4 SourceRelativeURI (org.eclipse.xtext.generator.trace.SourceRelativeURI)4 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)4 IResourceValidator (org.eclipse.xtext.validation.IResourceValidator)4