org.eclipse.xtext.resource.containers.DelegatingIAllContainerAdapter Java Examples

The following examples show how to use org.eclipse.xtext.resource.containers.DelegatingIAllContainerAdapter. 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 File: OpenFileContext.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
protected XtextResourceSet createResourceSet() {
	XtextResourceSet result = resourceSetProvider.get();
	ResourceDescriptionsData.ResourceSetAdapter.installResourceDescriptionsData(result, index);
	externalContentSupport.configureResourceSet(result, new OpenFileContentProvider());

	IAllContainersState allContainersState = new OpenFileAllContainersState(this);
	result.eAdapters().add(new DelegatingIAllContainerAdapter(allContainersState));

	return result;
}
 
Example #2
Source File: RuntimeResourceSetInitializer.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
public ResourceSet getInitializedResourceSet(List<String> pathes, UriFilter filter) {
	ResourceSet resourceSet = resourceSetProvider.get();
	Multimap<String, URI> pathToUriMap = getPathToUriMap(pathes, filter);
	IAllContainersState containersState = factory.getContainersState(pathes, pathToUriMap);
	resourceSet.eAdapters().add(new DelegatingIAllContainerAdapter(containersState));
	for (URI uri : pathToUriMap.values()) {
		resourceSet.createResource(uri);
	}
	return resourceSet;
}
 
Example #3
Source File: Reader.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
protected void installAsAdapter(ResourceSet set, IAllContainersState containersState)
		throws WorkflowInterruptedException {
	set.eAdapters().add(new DelegatingIAllContainerAdapter(containersState));
}