0

While determining the impact of various bug fixes, I often find myself trying to find all the routes through the codebase which can end up in my changed code. This is a tedious manual process, involving lots of clicking on method names in Eclipse and searching for 'References...' while I draw a tree structure of calls in my notepad.

This seems like it should be automatable, but whenever I search for such tools I fail to find such a thing. There seem to be tools which will analyse code for bugs, race-conditions, etc (FindBugs, PMD, Checkstyle, for example) but nothing which will simply output potential routes through the code. It's quite possible I'm not using the correct search terms.

Does such a tool exist for Java or I have overlooked a key reason why this is not possible?

4

2 回答 2

5

您正在搜索的不是“Open Call Hierarchy”命令吗?

要使用它,请选择方法、字段、构造函数等,然后选择“Open Call Hierarchy”。在这里,您可以浏览代码引用所选元素的位置。

还有一个捷径:Ctrl++AltH

于 2012-08-30T09:56:16.950 回答
1

我相信您正在寻找呼叫层次结构。它内置在 Eclipse、IntelliJ 和 Netbeans 中。

https://www.google.co.uk/search?q=eclipse+call+hierarchy

于 2012-08-30T09:54:55.730 回答