private void markAsMoveOrCopyTarget(ASTNode node, ASTNode newChild) {
ASTNode source = (ASTNode)this.clonedNodes.get(newChild);
if(source != null) {
if(this.cloneDepth == 0) {
PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(source, RewriteEventStore.ORIGINAL);
CopySourceInfo sourceInfo =
this.eventStore.markAsCopySource(
propertyLocation.getParent(),
propertyLocation.getProperty(),
source,
false);
this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
}
} else if((newChild.getFlags() & ASTNode.ORIGINAL) != 0) {
PropertyLocation propertyLocation = this.eventStore.getPropertyLocation(newChild, RewriteEventStore.ORIGINAL);
CopySourceInfo sourceInfo =
this.eventStore.markAsCopySource(
propertyLocation.getParent(),
propertyLocation.getProperty(),
newChild,
true);