List of usage examples for org.eclipse.jdt.core.dom ParameterizedType TYPE_PROPERTY
ChildPropertyDescriptor TYPE_PROPERTY
To view the source code for org.eclipse.jdt.core.dom ParameterizedType TYPE_PROPERTY.
Click Source Link
From source file:org.eclipse.che.jdt.dom.ASTNodes.java
License:Open Source License
/** * For {@link Name} or {@link org.eclipse.jdt.core.dom.Type} nodes, returns the topmost {@link org.eclipse.jdt.core.dom.Type} node * that shares the same type binding as the given node. * * @param node/*ww w . j a v a 2 s . c o m*/ * an ASTNode * @return the normalized {@link org.eclipse.jdt.core.dom.Type} node or the original node */ public static ASTNode getNormalizedNode(ASTNode node) { ASTNode current = node; // normalize name if (QualifiedName.NAME_PROPERTY.equals(current.getLocationInParent())) { current = current.getParent(); } // normalize type if (QualifiedType.NAME_PROPERTY.equals(current.getLocationInParent()) || SimpleType.NAME_PROPERTY.equals(current.getLocationInParent()) || NameQualifiedType.NAME_PROPERTY.equals(current.getLocationInParent())) { current = current.getParent(); } // normalize parameterized types if (ParameterizedType.TYPE_PROPERTY.equals(current.getLocationInParent())) { current = current.getParent(); } return current; }
From source file:org.eclipse.scout.sdk.saml.importer.internal.jdt.imports.OrganizeImportsHelper.java
License:Open Source License
public static ASTNode getNormalizedNode(ASTNode node) { ASTNode current = node;/* w ww .j a v a 2 s . com*/ // normalize name if (QualifiedName.NAME_PROPERTY.equals(current.getLocationInParent())) { current = current.getParent(); } // normalize type if (QualifiedType.NAME_PROPERTY.equals(current.getLocationInParent()) || SimpleType.NAME_PROPERTY.equals(current.getLocationInParent())) { current = current.getParent(); } // normalize parameterized types if (ParameterizedType.TYPE_PROPERTY.equals(current.getLocationInParent())) { current = current.getParent(); } return current; }