}
}
void preReplaceChildEvent(ASTNode node, ASTNode child, ASTNode newChild, StructuralPropertyDescriptor property) {
if(property.isChildProperty()) {
NodeRewriteEvent event = getNodeEvent(node, property);
event.setNewValue(newChild);
if(newChild != null) {
markAsMoveOrCopyTarget(node, newChild);
}
} else if(property.isChildListProperty()) {
ListRewriteEvent event = getListEvent(node, property);
int i = event.getIndex(child, ListRewriteEvent.NEW);
NodeRewriteEvent nodeEvent = (NodeRewriteEvent)event.getChildren()[i];
nodeEvent.setNewValue(newChild);
if(newChild != null) {
markAsMoveOrCopyTarget(node, newChild);
}
}
}