VariableDeclarationFragment node resolveBindind() returns null in eclipse/jdt/ast

前端 未结 3 681
故里飘歌
故里飘歌 2020-12-07 04:12

I\'m trying to try out eclipse jdt/ast following this article.

This is the java code as an input:

class Hello
{
    int hello()
    {
        int a =         


        
3条回答
  •  孤街浪徒
    2020-12-07 04:46

    Does this mean I have to import source codes I want to run ASTParser on in my current project?

    Right now I am using ASTParser incoporating with UIMA framework. In that framework, I could get source code in char[] only. Don't know how to get their corresponding IJavaProject and UnitName, which is needed if I .setSource() to a char[].

提交回复
热议问题