/*
* Get the roots of any changes.
*/
private IResource[] getRootResources(IResourceDelta root) {
final ChangeDescription changeDescription = new ChangeDescription();
try {
root.accept(new IResourceDeltaVisitor() {
public boolean visit(IResourceDelta delta) {
return changeDescription.recordChange(delta);
}
});
} catch (CoreException e) {
// Shouldn't happen since the ProposedResourceDelta accept doesn't throw an
// exception and our visitor doesn't either
Policy.log(IStatus.ERROR, "Internal error", e); //$NON-NLS-1$
}
return changeDescription.getRootResources();
}