I am looking to write a static analyser for a university class. To provide more power for the tool I would like to be able to look up the call hierarchy (as Ctrl+Alt+H does in Eclipse). This would also have to be a fast operation, so the lookup would probably have to be done against an index rather than bytecode scanning.
However, writing an Eclipse plugin would be too ambitious I expect. Instead I would rather decouple the parts of Eclipse which create the code index, and use a library to do lookups. The interface to the user would be on the command line, to simplify implementation.
I read that Eclipse uses Lucene to do the indexing, however, there must be a significant amount of work atop Lucene for the capabilities Eclipse allows.
The question is, is it possible to decouple the indexing capabilities of Eclipse for reuse? If not, are there other, readily available libraries available that could do the kind of processing I've discussed?
 Lucene In Action (IIRC)
I think there's been some misunderstanding. I'm not looking to inspect the class hierarchy, I want to inspect the *call* hierarchy. That's why searching and indexing (of some kind, though maybe that's not the right term) comes into the discussion. Inspecting the class hierarchy is probably a lot less expensive than inspecting the call hierarchy.
As for writing an Eclipse plugin, yes I'd love to, but given this assignment is on a very short timescale it's probably unlikely I'll manage it. But it's useful information that some of you feel this is not as tough as I think it will be.
Perhaps I have put too much emphasis on Eclipse, it occurred to me I'm really looking for any tool that provides an API for inspecting a call graph through the bytecode.
Thanks for your answers so far!
以上就是Is it possible to decouple the code indexing capabilities of Eclipse?的详细内容，更多请关注web前端其它相关文章！