use of org.eclipse.xtext.resource.impl.ProjectDescription in project xtext-core by eclipse.
the class ProjectDescriptionBasedContainerManager method getContainer.
@Override
public IContainer getContainer(final IResourceDescription desc, final IResourceDescriptions resourceDescriptions) {
final ChunkedResourceDescriptions chunkedResourceDescriptions = this.getChunkedResourceDescriptions(resourceDescriptions);
if ((chunkedResourceDescriptions == null)) {
String _name = ChunkedResourceDescriptions.class.getName();
String _plus = ("expected " + _name);
throw new IllegalArgumentException(_plus);
}
final ResourceSet resourceSet = chunkedResourceDescriptions.getResourceSet();
final ProjectDescription projectDescription = ProjectDescription.findInEmfObject(resourceSet);
final IContainer container = this.createContainer(resourceDescriptions, chunkedResourceDescriptions, projectDescription.getName());
return container;
}
use of org.eclipse.xtext.resource.impl.ProjectDescription in project xtext-core by eclipse.
the class ProjectDescriptionBasedContainerManager method getVisibleContainers.
@Override
public List<IContainer> getVisibleContainers(final IResourceDescription desc, final IResourceDescriptions resourceDescriptions) {
final ChunkedResourceDescriptions chunkedResourceDescriptions = this.getChunkedResourceDescriptions(resourceDescriptions);
if ((chunkedResourceDescriptions == null)) {
String _name = ChunkedResourceDescriptions.class.getName();
String _plus = ("expected " + _name);
throw new IllegalArgumentException(_plus);
}
final ResourceSet resourceSet = chunkedResourceDescriptions.getResourceSet();
final ProjectDescription projectDescription = ProjectDescription.findInEmfObject(resourceSet);
final ArrayList<IContainer> allContainers = CollectionLiterals.<IContainer>newArrayList();
allContainers.add(this.createContainer(resourceDescriptions, chunkedResourceDescriptions, projectDescription.getName()));
List<String> _dependencies = projectDescription.getDependencies();
for (final String name : _dependencies) {
allContainers.add(this.createContainer(resourceDescriptions, chunkedResourceDescriptions, name));
}
return allContainers;
}
Aggregations