private void validateIsNodeProperty(StructuralPropertyDescriptor property) { if (property.isChildListProperty()) { String message= property.getId() + " is not a node property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsListProperty(StructuralPropertyDescriptor property) { if (!property.isChildListProperty()) { String message= property.getId() + " is not a list property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsListProperty(StructuralPropertyDescriptor property) { if (!property.isChildListProperty()) { String message= property.getId() + " is not a list property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsNodeProperty(StructuralPropertyDescriptor property) { if (property.isChildListProperty()) { String message= property.getId() + " is not a node property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsListProperty(StructuralPropertyDescriptor property) { if (!property.isChildListProperty()) { String message= property.getId() + " is not a list property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsListProperty(StructuralPropertyDescriptor property) { if (!property.isChildListProperty()) { String message= property.getId() + " is not a list property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsListProperty(StructuralPropertyDescriptor property) { if (!property.isChildListProperty()) { String message= property.getId() + " is not a list property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private void validateIsNodeProperty(StructuralPropertyDescriptor property) { if (property.isChildListProperty()) { String message= property.getId() + " is not a node property"; //$NON-NLS-1$ throw new IllegalArgumentException(message); } }
private ChildListPropertyDescriptor getProperty() { List<StructuralPropertyDescriptor> list= fCallerNode.structuralPropertiesForType(); for (int i= 0; i < list.size(); i++) { StructuralPropertyDescriptor curr= list.get(i); if (curr.isChildListProperty() && "arguments".equals(curr.getId())) { //$NON-NLS-1$ return (ChildListPropertyDescriptor) curr; } } return null; }
private ChildListPropertyDescriptor getProperty() { List list= fCallerNode.structuralPropertiesForType(); for (int i= 0; i < list.size(); i++) { StructuralPropertyDescriptor curr= (StructuralPropertyDescriptor) list.get(i); if (curr.isChildListProperty() && "arguments".equals(curr.getId())) { //$NON-NLS-1$ return (ChildListPropertyDescriptor) curr; } } return null; }
private ChildListPropertyDescriptor getProperty() { List<StructuralPropertyDescriptor> list= fCallerNode.structuralPropertiesForType(); for (int i= 0; i < list.size(); i++) { StructuralPropertyDescriptor curr= list.get(i); if (curr.isChildListProperty() && "arguments".equals(curr.getId())) { //$NON-NLS-1$ return (ChildListPropertyDescriptor) curr; } } return null; }
private ChildListPropertyDescriptor getProperty() { List<StructuralPropertyDescriptor> list= fCallerNode.structuralPropertiesForType(); for (int i= 0; i < list.size(); i++) { StructuralPropertyDescriptor curr= list.get(i); if (curr.isChildListProperty() && "arguments".equals(curr.getId())) { //$NON-NLS-1$ return (ChildListPropertyDescriptor) curr; } } return null; }
static ASTNode[] getSiblingNodes(ASTNode node) { ASTNode parent= node.getParent(); StructuralPropertyDescriptor locationInParent= node.getLocationInParent(); if (locationInParent.isChildListProperty()) { List<? extends ASTNode> siblings= ASTNodes.getChildListProperty(parent, (ChildListPropertyDescriptor) locationInParent); return siblings.toArray(new ASTNode[siblings.size()]); } return null; }
private final int doVisit(ASTNode parent, StructuralPropertyDescriptor property, int offset) { Object node= getOriginalValue(parent, property); if (property.isChildProperty() && node != null) { return doVisit((ASTNode) node); } else if (property.isChildListProperty()) { return doVisitList((List) node, offset); } return offset; }
private final void voidVisit(ASTNode parent, StructuralPropertyDescriptor property) { Object node= getOriginalValue(parent, property); if (property.isChildProperty() && node != null) { voidVisit((ASTNode) node); } else if (property.isChildListProperty()) { voidVisitList((List) node); } }
private final void voidVisit(ASTNode parent, StructuralPropertyDescriptor property) { Object node= getOriginalValue(parent, property); if (property.isChildProperty() && node != null) { voidVisit((ASTNode) node); } else if (property.isChildListProperty()) { voidVisitList((List) node); } }
private final int doVisit(ASTNode parent, StructuralPropertyDescriptor property, int offset) { Object node= getOriginalValue(parent, property); if (property.isChildProperty() && node != null) { return doVisit((ASTNode) node); } else if (property.isChildListProperty()) { return doVisitList((List) node, offset); } return offset; }
private final int doVisit(ASTNode parent, StructuralPropertyDescriptor property, int offset) { Object node= getOriginalValue(parent, property); if (property.isChildProperty() && node != null) { return doVisit((ASTNode) node); } else if (property.isChildListProperty()) { return doVisitList((List) node, offset); } return offset; }
private final int doVisit(ASTNode parent, StructuralPropertyDescriptor property, int offset) { Object node= getOriginalValue(parent, property); if (property.isChildProperty() && node != null) { return doVisit((ASTNode) node); } else if (property.isChildListProperty()) { return doVisitList((List) node, offset); } return offset; }
void preAddChildEvent(ASTNode node, ASTNode child, StructuralPropertyDescriptor property) { if(property.isChildProperty()) { NodeRewriteEvent event = getNodeEvent(node, property); event.setNewValue(child); if(child != null) { markAsMoveOrCopyTarget(node, child); } } else if(property.isChildListProperty()) { // force event creation getListEvent(node, property); } }