Carrying out Impact Analysis [message #176083] |
Wed, 25 October 2006 08:33 |
Eclipse User |
|
|
|
Originally posted by: tyagih75.yahoo.com
How to carry out Impact Analysis for Java or C code. Looking for feature
where I can find out
a) All the other classes where a particular class has been used
For example Class "Name.java" has been instantiated in Classes Man, Dog ,
Cat etc.
b) All other classes where a method from a class has been used
For example Method updateName() from Name.java, has been used in some
other classes
b) All classes where a class level variable has been used.
|
|
|
Re: Carrying out Impact Analysis [message #176105 is a reply to message #176083] |
Wed, 25 October 2006 09:47 |
Asaf Yaffe Messages: 333 Registered: July 2009 |
Senior Member |
|
|
Here's how you do it in Java (for C, it may be different and depends on
the features of the C/C++ Development Tool):
> a) All the other classes where a particular class has been used
> For example Class "Name.java" has been instantiated in Classes Man, Dog
> , Cat etc.
Select the class definition in the source code (or Package Explorer,
Outline, or Type Hierarchy views), right-click, and use the References
menu to search for references to this class in the Project/Workspace.
> b) All other classes where a method from a class has been used
> For example Method updateName() from Name.java, has been used in some
> other classes b) All classes where a class level variable has been used.
Two options:
1. Use the same technique for class references described above. Note
that many false-positive hits may be returned if a method with the same
name exists in other classes.
2. Use the Call Hierarchy view: right-click the method definition and
select "Open Call Hierarchy" from the pop-up menu. You can use the
options in the Call Hierarchy view to define the search scope and
whether you want incoming or outgoing references to the function.
Another option which may be useful is to rename the class/method in
question and recompile the project. The Errors view will nicely point
out all references ;)
HTH!
Asaf
--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
|
|
|
Powered by
FUDForum. Page generated in 0.02892 seconds