@Override public boolean isEmpty() { return Iterables.isEmpty(getAllResourceDescriptions()); } }
/** * And if we are in the indexing phase, we don't want to see the local resources. */ @Override public IResourceDescriptions getResourceDescriptions(ResourceSet resourceSet) { IResourceDescriptions result = super.getResourceDescriptions(resourceSet); if (compilerPhases.isIndexing(resourceSet)) { // during indexing we don't want to see any local files String projectName = getProjectName(resourceSet); if(projectName != null) { final String encodedProjectName = URI.encodeSegment(projectName, true); Predicate<URI> predicate = new Predicate<URI>() { @Override public boolean apply(URI uri) { return isProjectLocal(uri, encodedProjectName); } }; if (result instanceof IShadowedResourceDescriptions) { return new ShadowedFilteringResourceDescriptions(result, predicate); } else { return new FilteringResourceDescriptions(result, predicate); } } } return result; }
@Override public Iterable<IEObjectDescription> getExportedObjectsByType(EClass type) { return filtered(delegate.getExportedObjectsByType(type)); }
@Override public Iterable<IEObjectDescription> getExportedObjects() { return filtered(delegate.getExportedObjects()); }
@Override public Iterable<IEObjectDescription> getExportedObjects(EClass type, QualifiedName name, boolean ignoreCase) { return filtered(delegate.getExportedObjects(type,name,ignoreCase)); }
@Override public Iterable<IEObjectDescription> getExportedObjectsByObject(EObject object) { return filtered(delegate.getExportedObjectsByObject(object)); }