Search in sources :

Example 1 with ResourceDescriptionsBasedContainer

use of org.eclipse.xtext.resource.impl.ResourceDescriptionsBasedContainer 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;
}
Also used : ResourceDescriptionsData(org.eclipse.xtext.resource.impl.ResourceDescriptionsData) LiveShadowedChunkedResourceDescriptions(org.eclipse.xtext.resource.impl.LiveShadowedChunkedResourceDescriptions) IResourceDescription(org.eclipse.xtext.resource.IResourceDescription) ResourceDescriptionsBasedContainer(org.eclipse.xtext.resource.impl.ResourceDescriptionsBasedContainer) IContainer(org.eclipse.xtext.resource.IContainer) LiveShadowedChunkedContainer(org.eclipse.xtext.resource.containers.LiveShadowedChunkedContainer)

Aggregations

IContainer (org.eclipse.xtext.resource.IContainer)1 IResourceDescription (org.eclipse.xtext.resource.IResourceDescription)1 LiveShadowedChunkedContainer (org.eclipse.xtext.resource.containers.LiveShadowedChunkedContainer)1 LiveShadowedChunkedResourceDescriptions (org.eclipse.xtext.resource.impl.LiveShadowedChunkedResourceDescriptions)1 ResourceDescriptionsBasedContainer (org.eclipse.xtext.resource.impl.ResourceDescriptionsBasedContainer)1 ResourceDescriptionsData (org.eclipse.xtext.resource.impl.ResourceDescriptionsData)1