Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 finds reference to member function in base class

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
eve Posted - Oct 26 2006 : 04:41:39 AM
Hi,

I would like to suggest a feature for VAX:

sometimes I want to do a 'find references' on a member function, but if you do that on a re-implemented function you only get the references to the reimplemented function, and not the references to the original function, while I'm actually looking for all re-implementations of that function.

I see 2 solutions to solve this:
- Add an option to jump to the definition of the member function that was re-implemented, so I can do a 'find references' from there.
- Allow to do a 'find references' that includes the references to the function in the base class. This was the behaviour in one of beta builds, but was (correctly) removed due to a bugfix.

thanks,
eli
14   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jan 31 2010 : 1:17:08 PM
case=3346 is implemented in build 1810
feline Posted - Oct 31 2006 : 08:57:37 AM
Once you move to VS2005 you *may* get some joy from the class browser feature. However this almost certainly requires leaving the IDE's intellisense enabled.

If you are using a fairly large C++ solution you may decide you are better off disabling the intellisense and just using VA instead
eve Posted - Oct 31 2006 : 08:50:03 AM
good try though

- Have you got a plan my lord?
- Yes I have, and it's so cunning you can brush your teeth with it.

feline Posted - Oct 31 2006 : 08:41:08 AM
18 interfaces, yep, so much for the cunning plan to find a work around.

Since this question has now come up in 3 separate threads I have put in a feature request to get the developers feedback on this. However this does not mean we will actually try and do this.

case=3346
eve Posted - Oct 31 2006 : 03:06:59 AM
I appreciate your effort to find an alternative, although I must say that this is not something I can't live without. It's just something that I could use now and then. If it is too hard to implement, then I guess you rather spend your development time on something else.

I'm still not convinced about the HCB window: the classes I'm speaking of implements 18 interfaces (don't start about the design ;-).
And no, the functions do not have a common part in there name.

thanks for your help.
feline Posted - Oct 30 2006 : 1:35:43 PM
I have no idea why 'Go To Definition' is so slow, I just put it down to the IDE being slow in places.

The End button in the HCB, I was talking about expanding each of the interface classes in turn. Typing in the HCB will only jump to a visible item, so if the function is in one of the collapsed interfaces then you will not see it. If you only have two or three interfaces then it is quite fast to expand them with they keyboard or mouse. Having done this you can type the name of the function.

Thinking about my own virtual functions, the classes involved tend to have similar names. Do your interface classes have similar names, preferably a common part of the name? If so you could use FSIW and filter on the common interface name part + the name of the function.


Rename does not try to scan all of the base classes, for sensible reasons. However any enhanced form of alt-g is going to run into exactly the same problems, and sea of edge cases. This is why I am focusing more on finding a reasonable alternative plan than putting in a feature request.
eve Posted - Oct 30 2006 : 09:58:12 AM
Actually, the Go To Definition was what made me post this suggestion: I wanted a goto definition that was smart enough to show me what the base function is and what the derived functions are, and filter out all functions that have nothing to do with the function I clicked on.
By the way: do you happen to know why the 'Go To Definition' is so slow? It does not use CPU nor disk access...

I don't think your trick with the End button in the HCB will work: my classes often derive from a few interfaces, and I want to find out from which interface my function is implemented. Pressing End just brings me to the last interface, without any guarantee that it contains the function I am looking for.
feline Posted - Oct 30 2006 : 09:47:18 AM
You may find typing the start of the function name with focus in the HCB helps, as discussed here:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5537

In VS2003 have you tried "right click -> Go To Definition" or "Go To Declaration"? It tends to be slower than VA's alt-g, but in my initial tests it is suggesting the virtual function in both the base and derived classes, since it cannot work out which one I want.
eve Posted - Oct 30 2006 : 02:28:09 AM
I'm using VC2003, but will switch this week to VC2005.
Most of our code is C++, but some of it was originally C.

feline Posted - Oct 27 2006 : 10:08:47 AM
I am starting to understand the problem.

You can do fairly complex filters in FSIW.

http://www.wholetomato.com/products/features/siw.asp

Use space to seperate the words, and all of them have to turn up. You can also put a minus sign in front of a work to remove all references to that word. So you could use the filter paint base -child to see all functions containing "paint" in any class containing "base" while excluding any class containing "child".

Which IDE and language are you using? I am wondering if something else already in the IDE might help.
eve Posted - Oct 27 2006 : 07:15:51 AM
The problem with HCB is that it show me all base classes. Often our classes implement multiple interfaces and I want to find out from which interface a function is implemented.
The problem with FSIW is that it is a simple filter: functions with the same name in a totally different context are also shown.
feline Posted - Oct 27 2006 : 07:04:16 AM
Do you use the HCB?

http://www.wholetomato.com/products/features/hcb.asp

Hovering the mouse over the function you want to find will show you the class this function belongs to. At the bottom of the HCB you will find the base class. The functions of the base class are listed underneath it. Double clicking on the base class name, or the function name will take you there.

FSIW is another quick way of finding the base class function.
eve Posted - Oct 27 2006 : 02:47:55 AM
I agree to all of this, but maybe a two-step workaround is to provide a way to get to the base class that contains the virtual function. From there a 'find references' will do the job.

Or something like a smarter 'Goto definition': currently it shows almost all functions with the same name, it would be great to have a list of all functions that also inherit/are inherited from a certain function.
feline Posted - Oct 26 2006 : 3:54:47 PM
Using VS2003 and VA 1539, if I do a Find References for a virtual function in a base class then all instances where it is re-implemented in derived classes are found. Obviously this requires getting to the base class before doing the find.

The reason it works this way is because Find References is also used by rename. If we try to rename all instances in the base class you have to stop and think about multiple inheritance and using a stable include (perhaps 3rd party library) class as the base class.

Asking Find References to behave differently when used manually, which is the obvious "solution", still leaves the twin problems of multiple inheritance (what are you trying to scan) and people who are deriving classes from core or 3rd party library classes. Suddenly you have to scan a lot more code than you do currently.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000