use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.
the class FileAwareTestLanguageStandaloneSetupGenerated method register.
public void register(Injector injector) {
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/testlanguage/FileAware")) {
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/testlanguage/FileAware", FileAwarePackage.eINSTANCE);
}
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("fileawaretestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("fileawaretestlanguage", serviceProvider);
}
use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.
the class BeeLangTestLanguageStandaloneSetupGenerated method register.
public void register(Injector injector) {
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2010/tmf/xtext/beeLangTestLanguage")) {
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2010/tmf/xtext/beeLangTestLanguage", BeeLangTestLanguagePackage.eINSTANCE);
}
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("beelangtestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("beelangtestlanguage", serviceProvider);
}
use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.
the class ExBeeLangTestLanguageStandaloneSetupGenerated 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("exbeelangtestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("exbeelangtestlanguage", serviceProvider);
}
use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.
the class SimpleBeeLangTestLanguageStandaloneSetupGenerated 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("simplebeelangtestlanguage", resourceFactory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("simplebeelangtestlanguage", serviceProvider);
}
use of org.eclipse.xtext.resource.IResourceFactory in project xtext-core by eclipse.
the class WrappingInjectorProvider method registerFactory.
private void registerFactory(Injector injector) {
IResourceFactory factory = injector.getInstance(IResourceFactory.class);
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
FileExtensionProvider fileExtensionProvider = injector.getInstance(FileExtensionProvider.class);
for (String ext : fileExtensionProvider.getFileExtensions()) {
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(ext, factory);
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put(ext, serviceProvider);
}
}
Aggregations