protected static ResourceDelta createDelta(Workspace workspace, DeltaDataTree delta, ResourceDeltaInfo deltaInfo, IPath pathInTree, IPath pathInDelta) {
// create the delta and fill it with information
ResourceDelta result = new ResourceDelta(pathInTree, deltaInfo);
// fill the result with information
NodeComparison compare = (NodeComparison) delta.getData(pathInDelta);
int comparison = compare.getUserComparison();
result.setStatus(comparison);
if (comparison == IResourceDelta.NO_CHANGE || Path.ROOT.equals(pathInTree)) {
ResourceInfo info = workspace.getResourceInfo(pathInTree, true, false);
result.setOldInfo(info);
result.setNewInfo(info);
} else {
result.setOldInfo((ResourceInfo) compare.getOldData());
result.setNewInfo((ResourceInfo) compare.getNewData());
}
// recurse over the children
IPath[] childKeys = delta.getChildren(pathInDelta);
int numChildren = childKeys.length;
if (numChildren == 0) {