org.eclipse.xtext.resource.IResourceFactory Java Examples

The following examples show how to use org.eclipse.xtext.resource.IResourceFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: n4js   Author: eclipse   File: DuplicateResourceAwareFileSetupContext.java    License: Eclipse Public License 1.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public Resource load(final ResourceSet resourceSet, final URI uri, final InputStream input) throws IOException {
	final Injector injector = IXtInjectorProvider.INSTANCE.getInjector(context.get(XpectJavaModel.class), uri);
	final Resource resource = injector.getInstance(IResourceFactory.class).createResource(uri);
	final Resource existingResousce = from(resourceSet.getResources())
			.firstMatch(r -> r.getURI().equals(resource.getURI())).orNull();
	if (null != existingResousce) {
		// remove the existing one
		resourceSet.getResources().remove(existingResousce);
	}
	resourceSet.getResources().add(resource);
	try {
		resource.load(input, null);
	} finally {
		if (input != null)
			input.close();
	}
	return resource;
}
 
Example #2
Source Project: n4js   Author: eclipse   File: N4JSStandaloneSetupGenerated.java    License: Eclipse Public License 1.0 6 votes vote down vote up
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4js", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4js", serviceProvider);
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsx", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsx", serviceProvider);
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("js", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("js", serviceProvider);
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("jsx", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("jsx", serviceProvider);
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsd", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4jsd", serviceProvider);
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("n4idl", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("n4idl", serviceProvider);
}
 
Example #3
Source Project: smarthome   Author: eclipse-archived   File: RegistryProvider.java    License: Eclipse Public License 2.0 6 votes vote down vote up
private void register(IResourceServiceProvider.Registry registry, Injector injector) {
    IResourceServiceProvider resourceServiceProvider = injector.getInstance(IResourceServiceProvider.class);
    FileExtensionProvider extensionProvider = injector.getInstance(FileExtensionProvider.class);
    for (String ext : extensionProvider.getFileExtensions()) {
        if (registry.getExtensionToFactoryMap().containsKey(ext)) {
            if (extensionProvider.getPrimaryFileExtension() == ext) {
                registry.getExtensionToFactoryMap().put(ext, resourceServiceProvider);
            }
        } else {
            registry.getExtensionToFactoryMap().put(ext, resourceServiceProvider);
        }

        IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
        Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(ext, resourceFactory);
    }
}
 
Example #4
Source Project: xtext-core   Author: eclipse   File: EpatchTestLanguageStandaloneSetupGenerated.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("epatchtestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("epatchtestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2008/tmf/xtext/EpatchTestLanguage", EpatchTestLanguagePackage.eINSTANCE);
	}
}
 
Example #5
Source Project: xtext-core   Author: eclipse   File: Bug362902StandaloneSetupGenerated.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug362902", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug362902", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/linking/Bug362902")) {
		EPackage.Registry.INSTANCE.put("http://www.xtext.org/linking/Bug362902", Bug362902Package.eINSTANCE);
	}
}
 
Example #6
Source Project: xtext-eclipse   Author: eclipse   File: ArithmeticsStandaloneSetupGenerated.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/Xtext/example/Arithmetics")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/Xtext/example/Arithmetics", ArithmeticsPackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("calc", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("calc", serviceProvider);
}
 
Example #7
Source Project: n4js   Author: eclipse   File: RegularExpressionStandaloneSetupGenerated.java    License: Eclipse Public License 1.0 5 votes vote down vote up
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/n4js/regex/RegularExpression")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/n4js/regex/RegularExpression", RegularExpressionPackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("regex", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("regex", serviceProvider);
}
 
Example #8
Source Project: gama   Author: gama-platform   File: GamlStandaloneSetupGenerated.java    License: GNU General Public License v3.0 5 votes vote down vote up
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.gama.msi/lang/gaml/Gaml")) {
		EPackage.Registry.INSTANCE.put("http://www.gama.msi/lang/gaml/Gaml", GamlPackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("gaml", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("gaml", serviceProvider);
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("experiment", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("experiment", serviceProvider);
}
 
Example #9
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("simplebacktrackingbug325745testlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("simplebacktrackingbug325745testlanguage", serviceProvider);
}
 
Example #10
Source Project: xtext-extras   Author: eclipse   File: XbaseStandaloneSetupGenerated.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("___xbase", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("___xbase", serviceProvider);
}
 
Example #11
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("hiddentokensequencertestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("hiddentokensequencertestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/hiddentokensequencertestlanguage")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/hiddentokensequencertestlanguage", HiddentokensequencertestPackage.eINSTANCE);
	}
}
 
Example #12
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2011/xtext/ui/common/types/xtext/ui/Refactoring")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2011/xtext/ui/common/types/xtext/ui/Refactoring", RefactoringTestLanguagePackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring", serviceProvider);
}
 
Example #13
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2010/xtext/ui/common/types/tests/ContentAssist")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2010/xtext/ui/common/types/tests/ContentAssist", ContentAssistTestLanguagePackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesAssistTest", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesAssistTest", serviceProvider);
}
 
Example #14
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("inheritancetest3language", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("inheritancetest3language", serviceProvider);
}
 
Example #15
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring2", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("typesRefactoring2", serviceProvider);
}
 
Example #16
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://eclipse.org/xtext/builderStandaloneTestLanguage")) {
		EPackage.Registry.INSTANCE.put("http://eclipse.org/xtext/builderStandaloneTestLanguage", BuilderTestLanguagePackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("buildertestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("buildertestlanguage", serviceProvider);
}
 
Example #17
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("fragmenttestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("fragmenttestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2015/tmf/xtext/fragments")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2015/tmf/xtext/fragments", FragmentTestLanguagePackage.eINSTANCE);
	}
}
 
Example #18
Source Project: xtext-core   Author: eclipse   File: SuperTestLanguageStandaloneSetupGenerated.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("supertestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("supertestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/SuperTestLanguage")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/SuperTestLanguage", SuperPackagePackage.eINSTANCE);
	}
}
 
Example #19
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("grammaraccesstestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("grammaraccesstestlanguage", serviceProvider);
}
 
Example #20
Source Project: xtext-core   Author: eclipse   File: Bug419429StandaloneSetupGenerated.java    License: Eclipse Public License 2.0 5 votes vote down vote up
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug419429", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug419429", serviceProvider);
}
 
Example #21
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("simpleunorderedgroupstestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("simpleunorderedgroupstestlanguage", serviceProvider);
}
 
Example #22
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("enumrulestestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("enumrulestestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/EnumRulesTest")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/EnumRulesTest", EnumRulesTestLanguagePackage.eINSTANCE);
	}
}
 
Example #23
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("qualifiednametestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("qualifiednametestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/tests/QualifiedNameTestLanguage")) {
		EPackage.Registry.INSTANCE.put("http://www.xtext.org/tests/QualifiedNameTestLanguage", QualifiedNamePackage.eINSTANCE);
	}
}
 
Example #24
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("fowlerdsltestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("fowlerdsltestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://example.xtext.org/FowlerDslTestLanguage")) {
		EPackage.Registry.INSTANCE.put("http://example.xtext.org/FowlerDslTestLanguage", FowlerdslPackage.eINSTANCE);
	}
}
 
Example #25
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);
	}
}
 
Example #26
Source Project: M2Doc   Author: ObeoNetwork   File: MyDslStandaloneSetupGenerated.java    License: Eclipse Public License 1.0 5 votes vote down vote up
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.xtext.org/example/mydsl/MyDsl")) {
		EPackage.Registry.INSTANCE.put("http://www.xtext.org/example/mydsl/MyDsl", MyDslPackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", serviceProvider);
}
 
Example #27
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("bug287184testlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("bug287184testlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2008/tmf/xtext/Bug287184Test")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2008/tmf/xtext/Bug287184Test", Bug287184TestPackage.eINSTANCE);
	}
}
 
Example #28
public void register(Injector injector) {
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/xtext/ui/common/tests/KeywordsTestLanguage")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/xtext/ui/common/tests/KeywordsTestLanguage", KeywordsUiTestLanguagePackage.eINSTANCE);
	}
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("keywordsuitestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("keywordsuitestlanguage", serviceProvider);
}
 
Example #29
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);
	}
}
 
Example #30
public void register(Injector injector) {
	IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
	IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
	
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("contextfindertestlanguage", resourceFactory);
	IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("contextfindertestlanguage", serviceProvider);
	if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/2009/tmf/xtext/contextfindertestlanguage")) {
		EPackage.Registry.INSTANCE.put("http://www.eclipse.org/2009/tmf/xtext/contextfindertestlanguage", ContextFinderTestPackage.eINSTANCE);
	}
}