Java Code Examples for org.eclipse.jdt.core.dom.StructuralPropertyDescriptor#getId()

The following examples show how to use org.eclipse.jdt.core.dom.StructuralPropertyDescriptor#getId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RewriteEventStore.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void validateIsListProperty(StructuralPropertyDescriptor property) {
	if (!property.isChildListProperty()) {
		String message= property.getId() + " is not a list property"; //$NON-NLS-1$
		throw new IllegalArgumentException(message);
	}
}
 
Example 2
Source File: RewriteEventStore.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void validateHasChildProperty(ASTNode parent, StructuralPropertyDescriptor property) {
	if (!parent.structuralPropertiesForType().contains(property)) {
		String message= Signature.getSimpleName(parent.getClass().getName()) + " has no property " + property.getId(); //$NON-NLS-1$
		throw new IllegalArgumentException(message);
	}
}
 
Example 3
Source File: RewriteEventStore.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void validateIsNodeProperty(StructuralPropertyDescriptor property) {
	if (property.isChildListProperty()) {
		String message= property.getId() + " is not a node property"; //$NON-NLS-1$
		throw new IllegalArgumentException(message);
	}
}
 
Example 4
Source File: ASTRewrite.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void validateIsListProperty(StructuralPropertyDescriptor property) {
	if (!property.isChildListProperty()) {
		String message= property.getId() + " is not a list property"; //$NON-NLS-1$
		throw new IllegalArgumentException(message);
	}
}
 
Example 5
Source File: ASTRewrite.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void validateIsPropertyOfNode(StructuralPropertyDescriptor property, ASTNode node) {
	if (!property.getNodeClass().isInstance(node)) {
		String message= property.getId() + " is not a property of type " + node.getClass().getName(); //$NON-NLS-1$
		throw new IllegalArgumentException(message);
	}
}