/** * Creates and returns a placeholder node for a source string that is to be inserted into * the output document at the position corresponding to the placeholder. * The string will be inserted without being reformatted beyond correcting * the indentation level. The placeholder node can either be inserted as new or * used to replace an existing node. * * @param code the string to be inserted; lines should should not have extra indentation * @param nodeType the ASTNode type that corresponds to the passed code. * @return the new placeholder node * @throws IllegalArgumentException if the code is null, or if the node * type is invalid */ public final ASTNode createStringPlaceholder(String code, int nodeType) { if (code == null) { throw new IllegalArgumentException(); } ASTNode placeholder= getNodeStore().newPlaceholderNode(nodeType); if (placeholder == null) { throw new IllegalArgumentException("String placeholder is not supported for type" + nodeType); //$NON-NLS-1$ } getNodeStore().markAsStringPlaceholder(placeholder, code); 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; }
/** * Creates and returns a placeholder node for a source string that is to be inserted into * the output document at the position corresponding to the placeholder. * The string will be inserted without being reformatted beyond correcting * the indentation level. The placeholder node can either be inserted as new or * used to replace an existing node. * * @param code the string to be inserted; lines should should not have extra indentation * @param nodeType the ASTNode type that corresponds to the passed code. * @return the new placeholder node * @throws IllegalArgumentException if the code is null, or if the node * type is invalid */ public final ASTNode createStringPlaceholder(String code, int nodeType) { if (code == null) { throw new IllegalArgumentException(); } ASTNode placeholder= getNodeStore().newPlaceholderNode(nodeType); if (placeholder == null) { throw new IllegalArgumentException("String placeholder is not supported for type" + nodeType); //$NON-NLS-1$ } getNodeStore().markAsStringPlaceholder(placeholder, code); 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; }
/** * Creates and returns a placeholder node for a source string that is to be inserted into * the output document at the position corresponding to the placeholder. * The string will be inserted without being reformatted beyond correcting * the indentation level. The placeholder node can either be inserted as new or * used to replace an existing node. * * @param code the string to be inserted; lines should should not have extra indentation * @param nodeType the ASTNode type that corresponds to the passed code. * @return the new placeholder node * @throws IllegalArgumentException if the code is null, or if the node * type is invalid */ public final ASTNode createStringPlaceholder(String code, int nodeType) { if (code == null) { throw new IllegalArgumentException(); } ASTNode placeholder= getNodeStore().newPlaceholderNode(nodeType); if (placeholder == null) { throw new IllegalArgumentException("String placeholder is not supported for type" + nodeType); //$NON-NLS-1$ } getNodeStore().markAsStringPlaceholder(placeholder, code); return placeholder; }
/** * Creates and returns a placeholder node for a source string that is to be inserted into * the output document at the position corresponding to the placeholder. * The string will be inserted without being reformatted beyond correcting * the indentation level. The placeholder node can either be inserted as new or * used to replace an existing node. * * @param code the string to be inserted; lines should should not have extra indentation * @param nodeType the ASTNode type that corresponds to the passed code. * @return the new placeholder node * @throws IllegalArgumentException if the code is null, or if the node * type is invalid */ public final ASTNode createStringPlaceholder(String code, int nodeType) { if (code == null) { throw new IllegalArgumentException(); } ASTNode placeholder= getNodeStore().newPlaceholderNode(nodeType); if (placeholder == null) { throw new IllegalArgumentException("String placeholder is not supported for type" + nodeType); //$NON-NLS-1$ } getNodeStore().markAsStringPlaceholder(placeholder, code); 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; }
/** * Creates and returns a placeholder node for a source string that is to be inserted into * the output document at the position corresponding to the placeholder. * The string will be inserted without being reformatted beyond correcting * the indentation level. The placeholder node can either be inserted as new or * used to replace an existing node. * * @param code the string to be inserted; lines should should not have extra indentation * @param nodeType the ASTNode type that corresponds to the passed code. * @return the new placeholder node * @throws IllegalArgumentException if the code is null, or if the node * type is invalid */ public final ASTNode createStringPlaceholder(String code, int nodeType) { if (code == null) { throw new IllegalArgumentException(); } ASTNode placeholder= getNodeStore().newPlaceholderNode(nodeType); if (placeholder == null) { throw new IllegalArgumentException("String placeholder is not supported for type" + nodeType); //$NON-NLS-1$ } getNodeStore().markAsStringPlaceholder(placeholder, code); return placeholder; }
/** * Creates and returns a placeholder node for a source string that is to be inserted into * the output document at the position corresponding to the placeholder. * The string will be inserted without being reformatted beyond correcting * the indentation level. The placeholder node can either be inserted as new or * used to replace an existing node. * * @param code the string to be inserted; lines should should not have extra indentation * @param nodeType the ASTNode type that corresponds to the passed code. * @return the new placeholder node * @throws IllegalArgumentException if the code is null, or if the node * type is invalid */ public final ASTNode createStringPlaceholder(String code, int nodeType) { if (code == null) { throw new IllegalArgumentException(); } ASTNode placeholder= getNodeStore().newPlaceholderNode(nodeType); if (placeholder == null) { throw new IllegalArgumentException("String placeholder is not supported for type" + nodeType); //$NON-NLS-1$ } getNodeStore().markAsStringPlaceholder(placeholder, code); 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; }