Search in sources :

Example 1 with LiveShadowedChunkedResourceDescriptions

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;
}
Also used : LiveShadowedChunkedResourceDescriptions(org.eclipse.xtext.resource.impl.LiveShadowedChunkedResourceDescriptions) LiveShadowedChunkedResourceDescriptions(org.eclipse.xtext.resource.impl.LiveShadowedChunkedResourceDescriptions) ChunkedResourceDescriptions(org.eclipse.xtext.resource.impl.ChunkedResourceDescriptions)

Example 2 with LiveShadowedChunkedResourceDescriptions

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;
}
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

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