Author |
Topic |
|
khb
Tomato Guru
Germany
337 Posts |
Posted - Aug 31 2006 : 04:53:28 AM
|
I don't know if this is a stupid idea, but I often stumple across variables and functions in my classes that I don't use any more due to refactoring. I would guess that this also happens to other people. Therefore, it would be great it VAX could search for such "unused" members and list them up. This way I could see if there is something that I have to clean up.
The basic functionality is already in VAX, i.e., Find References. It must be applied to all members of a class. If a member has only a declaration/definition, then it is listed in a window.
What do you think?
Regards, Marcus. |
|
feline
Whole Tomato Software
United Kingdom
19025 Posts |
Posted - Sep 01 2006 : 2:12:38 PM
|
an interesting idea, and as you say, this does seem to build on find references. i have put in a feature suggestion to see what people make of it.
case=2335 |
zen is the art of being at one with the two'ness |
|
|
fspafford
Senior Member
USA
45 Posts |
Posted - Apr 07 2008 : 1:24:11 PM
|
I would find this feature useful. I would like to quickly remove unused code so that maintenance is a bit easier. |
|
|
znakeeye
Tomato Guru
379 Posts |
Posted - Apr 09 2008 : 10:32:24 AM
|
I have sought for this for years now... :] |
|
|
vahtis
Starting Member
Finland
1 Posts |
Posted - Feb 23 2009 : 05:03:32 AM
|
I would love this feature. |
|
|
PsiX
Junior Member
14 Posts |
Posted - Mar 06 2009 : 03:27:31 AM
|
In its simplest form, this feature wouldn't be THAT useful. It is sometimes the case that legacy code still uses the member, though it is never called.
A Find All References of members of a class dialog would be nice (you have to do it anyway, if you want to find unused members, so why don't show all results?). It would list all members with a number of references (sortable on number/name) and would open the Find References Dialog on double click on a member. |
|
|
khb
Tomato Guru
Germany
337 Posts |
Posted - Mar 06 2009 : 03:41:23 AM
|
@PsiX: I can't follow your first argument. Of course you should know what you are doing if you refactor some code. Anyway, I like your "Find All References" idea as it is an extension of my initial idea.
Regards Marcus |
|
|
PsiX
Junior Member
14 Posts |
Posted - Mar 06 2009 : 04:19:26 AM
|
Using only "declaration/definition" as a precondition for unused members helps only in the simplest cases. Even automatic initialization in the constructor or a setter/getter would make the variable count as "used".
With a list of how frequent variables are used you gain insight even though the member counts as (syntactically) used. |
|
|
khb
Tomato Guru
Germany
337 Posts |
Posted - Mar 07 2009 : 1:52:57 PM
|
@PsiX: Ah, now I got you! Of course it would be ideal to track everything down starting from the main function and report about code that isn't called. But I guess using conditional function pointers wouldn't make this easy. Anyway, I would be happy for any support in finding unused members/functions. And I still like your idea.
Regards Marcus |
|
|
|
Topic |
|