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
 VA-Find References-Classname
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Jan 30 2015 :  12:37:13 PM  Show Profile  Reply with Quote
I would like to be able to configure VA to give back only references to the classname, not all places the verbiage appears.

By that I mean:

class MyClass // Yes! This is the definition of MyClass, so counts as a reference...
{
public:
MyClass() { } // not here, this is a reference to its ctor (which would also be useful to find-refs on)
~MyClass() { } // nope, this is not a reference to MyClass either (but is a ref to its dtor, which is a separate and useful find-refs target)

int fun1();
void fun2();
double fun3();
};

int MyClass::fun1() { return 9; } // NOPE: not a ref to MyClass
void MyClass::fun2() { } // NOPE: not a ref to MyClass
double MyClass::fun3() { return 9.9; } // NOPE: not a ref to MyClass

void main()
{
MyClass c; // YESSSSssss!!! THIS IS A REF TO MyClass
c->fun1();
}

To my mind, just because the letters appear in the correct order doesn't make it a reference. void MyClass::function_name() { } either in declaration or in definition are decl/defn of a member - and only appear when asking after "MyClass::function_name", not after "MyClass".

Constructors and destructors likewise are completely different beasts - they are not references to the class anymore than "fun1" is.

This is a loooooong standing issue, and it seems like technology has advanced to the point that this can be handled? I hope!

Thanks for a great product.

Edited by - Mordachai on Jan 30 2015 12:38:52 PM

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jan 30 2015 :  8:00:52 PM  Show Profile  Reply with Quote
In the Find References results window, press S (or use context menu) to remove most of the hits that you don't want to see.

Unfortunately, that will still leave the constructor/destructor in the results. I've opened a request to classify those separate from other references: case=87627
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Feb 03 2015 :  08:57:28 AM  Show Profile  Reply with Quote
Well I'll be! A context menu in the find results window - I learn something new everytime I whine about something :)

That may be fine. Ctor/Dtor are less distracting than the many false hits that member definitions generate.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Feb 03 2015 :  11:39:04 AM  Show Profile  Reply with Quote
There are many context menus in VA -- in Methods in File list, Open File dialog, Find Symbol dialog, Rename dialog, HCB in VA View, MRU in VA View, Find References results, Snippet editor.
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