private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove, ASTNode replacingNode, TextEditGroup editGroup) { if (first == null || last == null) { throw new IllegalArgumentException(); } NodeInfoStore nodeStore= this.rewriter.getNodeStore(); ASTNode placeholder= nodeStore.newPlaceholderNode(first.getNodeType()); // revisit: could use list type if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + first.getClass().getName()); //$NON-NLS-1$ } Block internalPlaceHolder= nodeStore.createCollapsePlaceholder(); CopySourceInfo info= getRewriteStore().createRangeCopy(this.parent, this.childListProperty, first, last, isMove, internalPlaceHolder, replacingNode, editGroup); nodeStore.markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove, ASTNode replacingNode, TextEditGroup editGroup) { if (first == null || last == null) { throw new IllegalArgumentException(); } NodeInfoStore nodeStore= this.rewriter.getNodeStore(); ASTNode placeholder= nodeStore.newPlaceholderNode(first.getNodeType()); // revisit: could use list type if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + first.getClass().getName()); //$NON-NLS-1$ } Block internalPlaceHolder= nodeStore.createCollapsePlaceholder(); CopySourceInfo info= getRewriteStore().createRangeCopy(this.parent, this.childListProperty, first, last, isMove, internalPlaceHolder, replacingNode, editGroup); nodeStore.markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove, ASTNode replacingNode, TextEditGroup editGroup) { if (first == null || last == null) { throw new IllegalArgumentException(); } NodeInfoStore nodeStore= this.rewriter.getNodeStore(); ASTNode placeholder= nodeStore.newPlaceholderNode(first.getNodeType()); // revisit: could use list type if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + first.getClass().getName()); //$NON-NLS-1$ } Block internalPlaceHolder= nodeStore.createCollapsePlaceholder(); CopySourceInfo info= getRewriteStore().createRangeCopy(this.parent, this.childListProperty, first, last, isMove, internalPlaceHolder, replacingNode, editGroup); nodeStore.markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove, ASTNode replacingNode, TextEditGroup editGroup) { if (first == null || last == null) { throw new IllegalArgumentException(); } NodeInfoStore nodeStore= this.rewriter.getNodeStore(); ASTNode placeholder= nodeStore.newPlaceholderNode(first.getNodeType()); // revisit: could use list type if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + first.getClass().getName()); //$NON-NLS-1$ } Block internalPlaceHolder= nodeStore.createCollapsePlaceholder(); CopySourceInfo info= getRewriteStore().createRangeCopy(this.parent, this.childListProperty, first, last, isMove, internalPlaceHolder, replacingNode, editGroup); nodeStore.markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove, ASTNode replacingNode, TextEditGroup editGroup) { if (first == null || last == null) { throw new IllegalArgumentException(); } NodeInfoStore nodeStore= this.rewriter.getNodeStore(); ASTNode placeholder= nodeStore.newPlaceholderNode(first.getNodeType()); // revisit: could use list type if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + first.getClass().getName()); //$NON-NLS-1$ } Block internalPlaceHolder= nodeStore.createCollapsePlaceholder(); CopySourceInfo info= getRewriteStore().createRangeCopy(this.parent, this.childListProperty, first, last, isMove, internalPlaceHolder, replacingNode, editGroup); nodeStore.markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode first, ASTNode last, boolean isMove, ASTNode replacingNode, TextEditGroup editGroup) { if (first == null || last == null) { throw new IllegalArgumentException(); } NodeInfoStore nodeStore= this.rewriter.getNodeStore(); ASTNode placeholder= nodeStore.newPlaceholderNode(first.getNodeType()); // revisit: could use list type if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + first.getClass().getName()); //$NON-NLS-1$ } Block internalPlaceHolder= nodeStore.createCollapsePlaceholder(); CopySourceInfo info= getRewriteStore().createRangeCopy(this.parent, this.childProperty, first, last, isMove, internalPlaceHolder, replacingNode, editGroup); nodeStore.markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode node, boolean isMove) { if (node == null) { throw new IllegalArgumentException(); } validateIsExistingNode(node); validateIsCorrectAST(node); CopySourceInfo info= getRewriteEventStore().markAsCopySource(node.getParent(), node.getLocationInParent(), node, isMove); ASTNode placeholder= getNodeStore().newPlaceholderNode(node.getNodeType()); if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + node.getClass().getName()); //$NON-NLS-1$ } getNodeStore().markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode node, boolean isMove) { if (node == null) { throw new IllegalArgumentException(); } validateIsExistingNode(node); validateIsCorrectAST(node); CopySourceInfo info= getRewriteEventStore().markAsCopySource(node.getParent(), node.getLocationInParent(), node, isMove); ASTNode placeholder= getNodeStore().newPlaceholderNode(node.getNodeType()); if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + node.getClass().getName()); //$NON-NLS-1$ } getNodeStore().markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode node, boolean isMove) { if (node == null) { throw new IllegalArgumentException(); } validateIsExistingNode(node); validateIsCorrectAST(node); CopySourceInfo info= getRewriteEventStore().markAsCopySource(node.getParent(), node.getLocationInParent(), node, isMove); ASTNode placeholder= getNodeStore().newPlaceholderNode(node.getNodeType()); if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + node.getClass().getName()); //$NON-NLS-1$ } getNodeStore().markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode node, boolean isMove) { if (node == null) { throw new IllegalArgumentException(); } validateIsExistingNode(node); validateIsCorrectAST(node); CopySourceInfo info= getRewriteEventStore().markAsCopySource(node.getParent(), node.getLocationInParent(), node, isMove); ASTNode placeholder= getNodeStore().newPlaceholderNode(node.getNodeType()); if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + node.getClass().getName()); //$NON-NLS-1$ } getNodeStore().markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode node, boolean isMove) { if (node == null) { throw new IllegalArgumentException(); } validateIsExistingNode(node); validateIsCorrectAST(node); CopySourceInfo info= getRewriteEventStore().markAsCopySource(node.getParent(), node.getLocationInParent(), node, isMove); ASTNode placeholder= getNodeStore().newPlaceholderNode(node.getNodeType()); if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + node.getClass().getName()); //$NON-NLS-1$ } getNodeStore().markAsCopyTarget(placeholder, info); return placeholder; }
private ASTNode createTargetNode(ASTNode node, boolean isMove) { if (node == null) { throw new IllegalArgumentException(); } validateIsExistingNode(node); validateIsCorrectAST(node); CopySourceInfo info= getRewriteEventStore().markAsCopySource(node.getParent(), node.getLocationInParent(), node, isMove); ASTNode placeholder= getNodeStore().newPlaceholderNode(node.getNodeType()); if (placeholder == null) { throw new IllegalArgumentException("Creating a target node is not supported for nodes of type" + node.getClass().getName()); //$NON-NLS-1$ } getNodeStore().markAsCopyTarget(placeholder, info); return placeholder; }
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); this.nodeStore.markAsCopyTarget(newChild, sourceInfo); } }
source, false); this.nodeStore.markAsCopyTarget(newChild, sourceInfo); newChild, true); this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
source, false); this.nodeStore.markAsCopyTarget(newChild, sourceInfo); newChild, true); this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
source, false); this.nodeStore.markAsCopyTarget(newChild, sourceInfo); newChild, true); this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
source, false); this.nodeStore.markAsCopyTarget(newChild, sourceInfo); newChild, true); this.nodeStore.markAsCopyTarget(newChild, sourceInfo);
source, false); this.nodeStore.markAsCopyTarget(newChild, sourceInfo); newChild, true); this.nodeStore.markAsCopyTarget(newChild, sourceInfo);