View Full Version : Does such a visualization tool exist?
Dale King
11-14-2003, 09:40 AM
I have a bit of Java code that I have been playing with on and off for a
year or two. It is not for a real customer, but more of a bit of computer
science tinkering for creating an OO version of a certain algorithm.
The heart of the algorithm is only 5 classes, but they interact in intricate
ways. And I have done lots and lots of refactoring to it so there is lots of
unnecessary complexity in there. I think there are methods that aren't used
anymore or methods that are only called from one place and themselves are
the only caller of another method.
I think there are many refactorings that can still be done including
inlining methods, moving methods, and moving some of the work into the
method being called, changing the method signature, etc. But it is hard to
see these looking at the code itself. You can't tell looking at a method who
calls it and who else calls the methods that it calls. You can't get the big
picture.
Does anyone know of a good tool to visualize this sort of thing to see
things like methods that are never called, methods that are only called from
one spot, etc.? UML is too high of a level.
What I am picturing is something that would show me graphically each class
along with each method and field and show arrows indicating which methods
call which methods and which method accesses a field. It would do things
like color code the methods that are only called from one place or those
that are never called. You might see a method in class A that only interacts
with methods in Class B which might indicate that the method really belongs
in class B. It could put numbers on the arrows to indicate how many times
the method is called. Even within a class you might see that these methods
don't interact with these other methods or state so perhaps should be in a
separate class. It would be important to also distinguish access levels as
this might show you that you have a method that is public for instance, but
is only accessed from inside the class so perhaps should be private.
I could imagine such a tool being invaluable for refactoring, but I wonder
if such a tool exists. It would be necessary to have lots of filtering
control to be able to restrict the view to make the picture intelligible.
--
Dale King
Dale King
11-14-2003, 10:27 AM
> Does anyone know of a good tool to visualize this sort of thing to see things like methods that are never called, methods that are only called
from one spot, etc.? UML is too high of a level.
To follow up my own post, I switched search engines and found some good hits
that look like what I am after.
reView from HeadWay Software (www.headwaysoftware.com) looks very promising,
but am interested in hearing about others.
--
Dale King
FredBear
11-19-2003, 04:56 PM
"> Does anyone know of a good tool to visualize this sort of thing to see things like methods that are never called, methods that are only called
from one spot, etc.? UML is too high of a level.
We have a tool that finds and deletes dead methods.
http://www.semdesigns.com/Products/Tools.html
Doesn't draw a graphical picture. Simply lists
them and optionally deletes them.
What I am picturing is something that would show me graphically each class along with each method and field and show arrows indicating which methods call which methods and which method accesses a field. It would do things like color code the methods that are only called from one place or those that are never called.
A hyperlinked source cross reference can provide
the same information: a method name which is defined
but not used by anything else is a dead method.
See our Java Source Browser at
http://www.semdesigns.com/Products/Formatters/JavaBrowser.html
You might see a method in class A that only interacts with methods in Class B which might indicate that the method really
belongs in class B. It could put numbers on the arrows to indicate how many times the method is called. Even within a class you might see that these methods don't interact with these other methods or state so perhaps should be in a separate class. It would be important to also distinguish access levels as this might show you that you have a method that is public for instance,
but is only accessed from inside the class so perhaps should be private. I could imagine such a tool being invaluable for refactoring, but I wonder if such a tool exists.
:-} Well, we don't have a tool that accepts dynamic filters on views.
The foundation engine, the DMS Software Reengineering Toolkit,
could be used to implement one.
It would be necessary to have lots of filtering control to be able to restrict the view to make the picture intelligible. -- Dale King
--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.