[问题] JDT里面的batch compiler的scope该如何用?

楼主: seedman (cc)   2013-08-28 06:22:41
我现在在做一个和程式语言结构有关的东西
因为想要以后可以用来分析用ant, maven管理的project
所以选择用已经有ant adapter的JDT batch compiler
详细问题和程式码我贴在stackoverflow上
简单来说是经由batch compiler
我已经有了每个档案的AstTree和Scope资讯
我现在想要知道每个AstNode他是对应到其他哪些AstNode
目前作法是在一个会对某个档案做处理的method里插入我自己写的AstVisitor
例如网址里面讲的
this.name = name
左边的name会对应到AstTree里面的其中一个Class member field
右边的name会对应到一个argument
或是 Type1 a = new Type1();
....
a.toString();
我想要知道a到底是什么type
猜测是可以在scope里面找到
但是找不到到底是怎么使用
自己试了试印出来的东西也都是null或是别的
不知道有没有人有trace过JDT batch compiler原始码的人可以解惑
stackoverflow网址:http://stackoverflow.com/questions/18472808/how-to-extract-scope-information-from-eclipse-jdt-core-batch-compiler
缩址:http://tinyurl.com/lqxyeph

Links booklink

Contact Us: admin [ a t ] ucptt.com