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 context sensitive
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wesley.olis
Junior Member

10 Posts

Posted - Mar 05 2014 :  02:49:58 AM  Show Profile  Reply with Quote
VS view call hierarchy is unfortunately ex-termly slow usually doesn't yield the results that someone is looking for!

It would be great if this function was type sensitive, to produce less visual noise.
It would also be a great help to gain all the context in which the function is being used that one has to re-factoring.

Similar to VA find references, which is reasonably fast
it would be great to have a find "VA FIND references context sensitive"
which then checks the variable type that the found reference is called on, to ensure that it's of the same class type as the subject member function of "VA Find references context".

This must also take into account class inheritance and then be able to order the information by type of classes, with the direct references to the current class listed first.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 05 2014 :  8:13:07 PM  Show Profile  Reply with Quote
I don't understand. Can you post a short code example showing what you are trying to find? Find References is already designed to return all references to a function call, checking that the references are valid before listing them.

zen is the art of being at one with the two'ness
Go to Top of Page

wesley.olis
Junior Member

10 Posts

Posted - Mar 05 2014 :  11:47:41 PM  Show Profile  Reply with Quote
Right let me rephrase that.

It would be great if "VA find references" was type sensitive, to produce less visual noise.
It would also be a great help to gain all the context in which the function is being used that one has to re-factor.
Similar to VA find references, which is reasonably fast
it would be great to have a find "VA FIND references context sensitive"
The difference is that VA FIND RCS, will then check the variable type that the found reference is called on to ensure that it's of the same class type as the subject member function.

Example, were find references is launched on Math:"add"

int add( int a, int b ){..}

class Math
{
virtual int "add"( int a, int b ){..}
}

class Math2
{
int "add"( int a, int b ){..}
}

class MathI : public Math
{
virtual int "add"( int a, int b ){..}
}

class process1
{
Math mat;
Math* pmat = new Math();

Math2 mat2;
Math2* pmat2 = new Math();

Math* pmatI = new MathI();

mat.add(1,1);
pmat->add(2,2);

mat2.add(3,3);
pmat2->add(4,4);

pmatI->add(5,5);

add(6,6);
}

Currently the resulting search would yield, which is not context sensitive to the current class.
mat.add(1,1);
pmat->add(2,2);
mat2.add(3,3);
pmat2->add(4,4);
pmatI->add(5,5);
add(5,5);

It would be nice for VS Find Reference context sensitive to return the following:

Class Math
------------------------
mat.add(1,1);
pmat->add(2,2);

Class MathI : public Math
------------------------
pmatI->add(5,5);

Example, were find references is launched on MathI:"add"
pmatI->add(5,5);

One can include an option, shortcut to toggle the ability to include other parents or childs or both inherited classes on or off as in the case below.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 07 2014 :  8:23:30 PM  Show Profile  Reply with Quote
You are describing what VA Find References already does:

http://docs.wholetomato.com/default.asp?W189

I still don't understand what new behaviour you are asking for.

zen is the art of being at one with the two'ness
Go to Top of Page

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Mar 10 2014 :  10:38:19 AM  Show Profile  Reply with Quote
I think that this relates to case=79290:
http://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=11672

Or not?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 10 2014 :  9:21:45 PM  Show Profile  Reply with Quote
I am not sure, its a good idea. Its also possible the request is talking about right clicking into the Find References Results window and changing the setting:

Inherited and overridden references

zen is the art of being at one with the two'ness
Go to Top of Page

wesley.olis
Junior Member

10 Posts

Posted - Mar 11 2014 :  02:50:45 AM  Show Profile  Reply with Quote
Hi,

I think I have figured it out.
Right Click context menu 'Find All References'
does what I am looking for but place its results in a different output format.

But if executed via the main window menu.
VASSISTX->"Find Referances", then it doesn't do what I am looking for
and neither does the "Display Inherited and Overridden References" work.

I see that display unknown guess hits, it also a cause for a little bit of noise.
Should the two menu functions not be do the same thing as I already see
their is find reference for in file.

Feels like a little bit of inconsistency their to myself.
Go to Top of Page

chrisaverage
Junior Member

Poland
20 Posts

Posted - Mar 11 2014 :  05:00:59 AM  Show Profile  Reply with Quote
I think you're confusing two different functions. Right click -> Find All References is the built-in vanilla Visual Studio facility.
VA has similar (better and faster in my opinion) function. It's accessible in 3 different vays:
via main menu VASSIST -> Find References, via right click -> Refactor (VA) -> Find References and via shortcut (Shift+Alt+F by default)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 11 2014 :  12:35:26 PM  Show Profile  Reply with Quote
As chrisaverage says, you are looking at an IDE command and a VA command, which is why they work differently. I have replied in more detail to your other post, in http://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=11672

zen is the art of being at one with the two'ness
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