Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Find "unused" members
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

khb
Tomato Guru

Germany
337 Posts

Posted - Aug 31 2006 :  04:53:28 AM  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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
Go to Top of Page

fspafford
Senior Member

USA
45 Posts

Posted - Apr 07 2008 :  1:24:11 PM  Show Profile  Reply with Quote
I would find this feature useful. I would like to quickly remove unused code so that maintenance is a bit easier.
Go to Top of Page

znakeeye
Tomato Guru

379 Posts

Posted - Apr 09 2008 :  10:32:24 AM  Show Profile  Reply with Quote
I have sought for this for years now... :]
Go to Top of Page

vahtis
Starting Member

Finland
1 Posts

Posted - Feb 23 2009 :  05:03:32 AM  Show Profile  Reply with Quote
I would love this feature.
Go to Top of Page

PsiX
Junior Member

14 Posts

Posted - Mar 06 2009 :  03:27:31 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

khb
Tomato Guru

Germany
337 Posts

Posted - Mar 06 2009 :  03:41:23 AM  Show Profile  Reply with Quote
@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
Go to Top of Page

PsiX
Junior Member

14 Posts

Posted - Mar 06 2009 :  04:19:26 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

khb
Tomato Guru

Germany
337 Posts

Posted - Mar 07 2009 :  1:52:57 PM  Show Profile  Reply with Quote
@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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000