What kind of information JDT caches about program? [message #647254] |
Wed, 05 January 2011 12:34 |
Aivar Annamaa Messages: 33 Registered: July 2009 |
Member |
|
|
Hi!
I'm creating a program analysis where I need type hierarchy and call graph, (or some kind of compilation unit dependency graph). Are there some relevant cached data structures collected by JDT that I could use?
How, for example, "call hierarchy" view works? It's not very fast, does it mean it uses SearchEngine each time?
What kind of indexes SearchEngine uses?
Is there some article describing these things?
Aivar
[Updated on: Wed, 05 January 2011 12:36] Report message to a moderator
|
|
|
|
|
|
Re: What kind of information JDT caches about program? [message #655048 is a reply to message #654524] |
Fri, 18 February 2011 07:27 |
Aivar Annamaa Messages: 33 Registered: July 2009 |
Member |
|
|
I'm doing string analysis -- trying to collect all possible values of certain string expressions. At one phase I need to find all call-sites for a method. For this I tried to use SearchEngine, but it felt too slow (I want to run the analysis after each file save).
I understand that when I use SearchEngine to locate method references, then it uses some index from identifiers to files to locate possible files, then parses the files and reports the locations. For some reason I get also some invalid matches (correct method name but different signature). Therefore after getting a match, I'm parsing the file again myself to check the validity of the match. If the method is eg. "getName", then lot of files need to be processed and it takes too much time.
Now I'm trying to do without SearchEngine. I begin with parsing and analyzing all files in a project and later parse only files dependent on currently modified files (ie. using types defined in those other files). I'd like to get this dependecy information from JDT.
Ideal solution for me would be that JDT exposes some kind of call-graph that compiler uses, but seems that such thing is not available.
[Updated on: Fri, 18 February 2011 07:30] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03381 seconds