Why does resolveBinding() return null even though I setResolveBindings(true) on my ASTParser?

我们两清 提交于 2019-11-28 13:37:32

Tucked away at the bottom of the overview of ASTParser.setKind(), carefully hidden from people troubleshooting resolveBinding() and setResolveBindings(), is the statement

Binding information is only computed when kind is K_COMPILATION_UNIT.

(from the online Javadoc)

I don't understand offhand why this would be the case, but it does seem to point pretty clearly at what needs to be different!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!