Community
Participate
Working Groups
20030227 similarly to MethodInvocation.resolveMethodBinding and ContrucotorInvocation.resolveConstructorBinding we should have FieldAccess.resolveFieldBinding
I will add it.
Don't you have a workaround using the fieldAccess.getName().resolveBinding()?
I checked that fieldAccess beging a field access node, the following code allows you to get the binding: Name name = fieldAccess.getName(); IBinding binding = name.resolveBinding(); if (binding != null && IBinding.VARIABLE == binding.getKind()) { IVariableBinding variableBinding = (IVariableBinding) binding; ..... } I agree that to be consistent this method resolveVariableBinding() rather than resolveFieldBinding() should be added on FieldAccess and SuperFieldAccess. Defer for post 2.1.
no probs, post 2.2 is fine
post 2.1, i meant :)
reopen
Trivial to add.
Fixed and released in 2.2 stream. Regression tests added (updating existing tests to use the new APIs).
Verified.