Bug 85226 [1.5] EnumConstantDeclaration should declare resolveConstructorBinding
I20050209 (jdt-core of 20050215) EnumConstantDeclaration should allow me to query its method binding, as declaring an enum constant also invokes a constructor: enum Natural { ONE(1), TWO(2); private final int fInt; Natural(int n) { fInt= n; } } I would expect a method similar to ClassInstanceCreation: public IMethodBinding resolveConstructorBinding();
org.eclipse.jdt.astview/src/org/eclipse/jdt/astview/views/ASTViewContentProvider.java
ASTNode node= (ASTNode) child;
			ASTNode parent= node.getParent();
			if (parent != null) {
				StructuralPropertyDescriptor prop= node.getLocationInParent();
				return new NodeProperty(parent, prop);
			}
		} else if (child instanceof ASTAttribute) {
			return ((ASTAttribute) child).getParent();
		}
		return null;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
	 */
	public Object[] getChildren(Object parent) {
		if (parent instanceof ASTAttribute) {
			return ((ASTAttribute) parent).getChildren();
		} else if (parent instanceof ASTNode) {
			return getNodeChildren((ASTNode) parent);
		}
		return new Object[0];
	}
	
	private Object[] getNodeChildren(ASTNode node) {
		ArrayList res= new ArrayList();
		if (node instanceof Expression) {
			Expression expression= (Expression) node;
			ITypeBinding expressionTypeBinding= expression.resolveTypeBinding();
			res.add(createExpressionTypeBinding(node, expressionTypeBinding));