All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.xtext.resource.XtextResourceFactory Maven / Gradle / Ivy

package org.eclipse.xtext.resource;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;

import com.google.inject.Inject;
import com.google.inject.Provider;

public class XtextResourceFactory implements IResourceFactory {

	private Provider provider;

	@Inject
	public XtextResourceFactory(Provider resourceProvider) {
		this.provider = resourceProvider;
	}
	
	public Resource createResource(URI uri) {
		XtextResource xtextResource = provider.get();
		xtextResource.setURI(uri);
		return xtextResource;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy