use of org.eclipse.xtext.resource.impl.LiveShadowedChunkedResourceDescriptions in project xtext-core by eclipse.
the class ProjectDescriptionBasedContainerManager method getChunkedResourceDescriptions.
protected ChunkedResourceDescriptions getChunkedResourceDescriptions(final IResourceDescriptions resourceDescriptions) {
ChunkedResourceDescriptions _switchResult = null;
boolean _matched = false;
if (resourceDescriptions instanceof ChunkedResourceDescriptions) {
_matched = true;
_switchResult = ((ChunkedResourceDescriptions) resourceDescriptions);
}
if (!_matched) {
if (resourceDescriptions instanceof LiveShadowedChunkedResourceDescriptions) {
_matched = true;
_switchResult = this.getChunkedResourceDescriptions(((LiveShadowedChunkedResourceDescriptions) resourceDescriptions).getGlobalDescriptions());
}
}
if (!_matched) {
_switchResult = null;
}
return _switchResult;
}
use of org.eclipse.xtext.resource.impl.LiveShadowedChunkedResourceDescriptions in project xtext-core by eclipse.
the class ProjectDescriptionBasedContainerManager method createContainer.
protected IContainer createContainer(final IResourceDescriptions resourceDescriptions, final ChunkedResourceDescriptions chunkedResourceDescriptions, final String projectName) {
IContainer _xifexpression = null;
if ((resourceDescriptions instanceof LiveShadowedChunkedResourceDescriptions)) {
_xifexpression = new LiveShadowedChunkedContainer(((LiveShadowedChunkedResourceDescriptions) resourceDescriptions), projectName);
} else {
ResourceDescriptionsData _elvis = null;
ResourceDescriptionsData _container = chunkedResourceDescriptions.getContainer(projectName);
if (_container != null) {
_elvis = _container;
} else {
Set<IResourceDescription> _emptySet = CollectionLiterals.<IResourceDescription>emptySet();
ResourceDescriptionsData _resourceDescriptionsData = new ResourceDescriptionsData(_emptySet);
_elvis = _resourceDescriptionsData;
}
_xifexpression = new ResourceDescriptionsBasedContainer(_elvis);
}
return _xifexpression;
}
Aggregations