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 references of specific object method
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Dec 10 2013 :  2:21:02 PM  Show Profile  Reply with Quote
Currently if I invoke to find references for method, it lists all instances of method for any object with equally named method.
It would be fine to have an option to look only for all instances of call to method of specific object.

For example:
static UIElement m_spec_elm = new BlahBlah();

...
m_spec_elm.Focus();

...
if (!m_spec_elm.IsFocus)
m_spec_elm.Focus();


I want only instances where m_spec_elm.Focus() is invoked.
Ofcorse I can use find dialog, but it is not as handy and it is not as transparent.

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Dec 10 2013 :  5:49:13 PM  Show Profile  Reply with Quote
It seems to me what you're asking VA X to do is to find the intersection of two different Find References results sets, or to compose them, and I tend to think adding pivot table support to the find dialog might confuse some people.

I don't think the GUI is the way to go for this. CppDepend would be a good tool to look at for nontrivial searches through your code. You can use it to find all places where objects of a given type with a name matching some criteria call a method whose first argument derives from CObject whose body uses a static_cast and has a cyclomatic complexity of between 8 and 20. It's all done with a custom LINQ system, so you can mix and match parts of queries to get whatever result set you want. It's not really set up to be an editing tool, though; it's more for analysis and quality tracking. (It's not really a competitive tool to VA X in my opinion, so I hope they don't mind my mentioning it here.)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 10 2013 :  7:43:21 PM  Show Profile  Reply with Quote
Find References is designed to find all references to the symbol you have done the find on.

Here, have you considered doing a Find References on the variable, "m_spec_elm", then in the Find References Results window you can use Ctrl-F to search the results for the method call you want. Not as direct, but you can do this now, and you can then delete any lines in the results that you are not interested in by using the Del key.

Jay, I have never used pivot tables, so I cannot comment on them. The concept of intersections makes sense, but I tend to agree that any GUI for this is likely to be messy and complex to use.

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

foxmuldr
Tomato Guru

USA
402 Posts

Posted - Dec 11 2013 :  05:34:59 AM  Show Profile  Reply with Quote
"then delete any lines in the results that you are not interested in by using the Del key."

Did not know that. Another awesome VAX feature. :-)
Go to Top of Page

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Dec 11 2013 :  10:38:58 AM  Show Profile  Reply with Quote
quote:
Originally posted by foxmuldr

"then delete any lines in the results that you are not interested in by using the Del key."

Did not know that. Another awesome VAX feature. :-)


I would prefer some sort of switch based filter. My goal is not to overlook something.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 23 2013 :  9:56:03 PM  Show Profile  Reply with Quote
Apologies for the slow reply.

I am trying to decide the best approach here. A more limited Find References as you first suggested, or an ability to filter the Find References Results list after you have run the find, to only show all results that contain your filter string.

Filtering the results sounds more useful in general, but will not help you if you have multiple different variables with the same name. Do you have any thoughts here?

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 - Dec 25 2013 :  12:48:37 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline
Filtering the results sounds more useful in general, but will not help you if you have multiple different variables with the same name. Do you have any thoughts here?


It must be looking for all references in current context. For example, if variable is a field of one class, it should list only instances of method calls to this field.

Let's say, that class Foo has a field "m_sel" of type FooSel, which has a method "SelectAll".
Then in code is:

class FooSel
{
...
void SelectAll();
...
};

class Foo
{
FooSel * m_sel;
...
};

...

Foo mf = new Foo();
mf->m_sel->SelectAll();

If I right click on mf->m_sel->SelectAll() and choose "Find all specific references", I want all instances of call to Foo::m_sel::SelectAll and not all instances of all methods that has name SelectAll.

Dusan
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 30 2013 :  4:04:16 PM  Show Profile  Reply with Quote
This makes sense, I have put in a feature request to see what our developers make of it:

case=79290

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:47:25 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

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 11 2014 :  12:34:09 PM  Show Profile  Reply with Quote
Right Click context menu and 'Find All References' is an IDE command, and has nothing to do with VA.

Can you explain, perhaps in a new thread, what problems you are having with VA's Find References command, and also what you mean by "Display Inherited and Overridden References" does not work? "Display Inherited and Overridden References" does work for me, search on a virtual function in a base class, and then toggling this alters what is displayed in the Find References Results window.

Its certainly possible you are seeing one or more bugs with VA's Find References, if so it would be useful to know what problems you are seeing.

You have posted this to two different threads, but discussing this in two different threads isn't going to work well, things will be split up.

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