/** * Sets the deltas to register the changes resulting from this operation for this source element * and its destination. If the operation is a cross project operation * * <ul> * <li>On a copy, the delta should be rooted in the dest project * <li>On a move, two deltas are generated * <ul> * <li>one rooted in the source project * <li>one rooted in the destination project * </ul> * </ul> * * If the operation is rooted in a single project, the delta is rooted in that project */ protected void prepareDeltas( IJavaElement sourceElement, IJavaElement destinationElement, boolean isMove) { if (Util.isExcluded(sourceElement) || Util.isExcluded(destinationElement)) return; IJavaProject destProject = destinationElement.getJavaProject(); if (isMove) { IJavaProject sourceProject = sourceElement.getJavaProject(); getDeltaFor(sourceProject).movedFrom(sourceElement, destinationElement); getDeltaFor(destProject).movedTo(destinationElement, sourceElement); } else { getDeltaFor(destProject).added(destinationElement); } }