NetBeans 7 dependency graph (unused class/method)

那年仲夏 提交于 2019-12-21 22:39:29

问题


Is there a way to create a dependency graph for classes and/or methods of Java SE projects within NetBeans 7? I have a very large project and I'd like to clean up unused classes or methods (and a dependency graph would also be useful).

The "center" of the graph would be the main() entry point of main classes I invoke, and adjacencies would be method calls (including some Swing framework methods to classes which override the Java Swing framework).


回答1:


That's weird, when I right click on a project in NetBeans 7.0.1 I can choose "Show dependency graph" and it shows me a dependency graph, complete with conflicts and everything!




回答2:


if you want method dependency (calll hirearchy) viewer, it is descripted: http://netbeans.dzone.com/announcements/new-class-visualization-module

in plugin manager add update center: http://updates.netbeans.org/netbeans/updates/dev/uc/final/main/catalog.xml.gz and http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz

now you can install

Graphical Class View

Version: 1.4 Source: Latest Development Build
Plugin Description Provides a diagram of Java classes showing interdependencies between fields and methods in that class. Useful for quickly figuring out what are the important methods and fields in an unfamiliar Java class.

you can invoke right click to method -> graphical view,

is it ? Jirka



来源:https://stackoverflow.com/questions/5123620/netbeans-7-dependency-graph-unused-class-method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!