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
 Extend context list with symbols from the include
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
285 Posts

Posted - Feb 04 2020 :  02:24:22 AM  Show Profile  Reply with Quote
Usually you have a source.cpp and mostly a source.h file.

You write code in the source.cpp with the class named CSource and search for a function CSource:Foo. You can't find it, because it is inline defined in source.h

Would be nice to see the symbols defined in the header also in the "list methods in current file", even if it breaks the name ;)
So all methods of the CSource class are visible (combined).

Same would be nice to have it vice vers.
Editing a Source.h pressing Alt+M and see the symbol files in the Source.cpp too.

This fetaure makes only sense of source file and header filename are identical.

Idea to seperate them from the normal symbol: Show them in light grey...

Just my 2 cents.

Greatings
- Martin

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
16737 Posts

Posted - Feb 04 2020 :  09:47:38 AM  Show Profile  Reply with Quote
There are already a couple of ways of getting this information. Firstly, place the caret into the class name, or one of the class members, and press Alt-Shift-G, for the Goto Related menu. From this menu you can access the "Members of xxx" dialog, which is a searchable dialog listing all of the members of the class, so this will include all members, regardless of which file you are in.

There is also the Hovering Class Browser, the bottom half of VA View. Show VA View, then make sure that keyboard focus is in the editor window, and hover the mouse over the class name or one of the class members. This will show all of the class members in VA View. You can then pin this class, to stop VA View from updating with a different class if you want.

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

xMRi
Tomato Guru

Germany
285 Posts

Posted - Feb 13 2020 :  03:24:01 AM  Show Profile  Reply with Quote
Thanks for your answer!
I know all this tricks.

The major tool is still the "List methods in current filel"
Another idea would be to extend/alternate/replacce this list with a new function call "List methods aof current and AND Headers"

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16737 Posts

Posted - Feb 13 2020 :  06:04:01 AM  Show Profile  Reply with Quote
Are you specifically looking for all functions in both files, regardless of class, so even non class functions? Or are you looking to easily search for all of the class members for a specific class?

If you are looking to search the members of the class easily you could try using VA's Find Symbol dialog, having turned Off:

Find Symbol dialog -> Right click menu -> Initialize search with editor selection

for ease. This way the dialog will always remember your last search term, and if the first word in the search is your class name, then you get a searchable dialog of all class members.

I see the appeal of what you are asking for, but then it's no longer the list of members in the current file, and once your file contains more than one class, or classes and free functions, then the list pulling in items from another file starts to make less sense.

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

xMRi
Tomato Guru

Germany
285 Posts

Posted - Feb 14 2020 :  02:48:36 AM  Show Profile  Reply with Quote
The intention is:

I'm working in a context of a file and a header.
Assume I am in the cpp file. I may be in a different class, maybe not even in the near of the class I want to change.

I know that there is a function CFoo::Foo. But in my case this function is an inliner in the class header. I don't know or remember. But I know I am in the correct source and header combination.

Pressing Alt+M ist intuitiv, because I know I am in the context and otherwise I need to jump to a another class function or anywhere. Remember I am in the source wilderness and not in the near of a usage of the class.

Al+M doesn't help me. Saddly I can't see the the CFoo::Foo function. Even if the naming is complicated I can shrink down the list of members effectively with .Foo but now I need to open the Header file first, so I press Esc, Alt+O, Alt+M again and enter .Foo again...

I agree that all functions you mention work.
But in the case that you are "somewhere" and not in the near of a symbol of this type this functions need further actions to get to my result.
Alt+S is to slow and may return to much entries for .Foo and Alt+M is the usual way to work in a known source context.

If you have a faster way, tell it ;)
I am eager to hear.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16737 Posts

Posted - Feb 18 2020 :  3:00:54 PM  Show Profile  Reply with Quote
OK, now I see what you are thinking and doing, so this idea does actually make sense now.

Assuming we had a go at this, so you are in a cpp file with a matching .h file, and you press Alt-M, are you expecting to see all items from both files in the single list? A simple implementation of this will result in duplicate entries, since you will have both the declaration and the implementation of class member functions listed. You can even argue that this is helpful, but it just sounds noisy to me.

What about non class members that are declared in the header file? Should these be included? struct's?

I am trying to get a sense of where to draw the lines for what should and should not be in the ideal list.

Thinking about working with this list, you select an inline function from the Alt-M list, which takes you to the header file. Now the Alt-M list (probably) won't list the function you have just been working in, since you have just changed files. Is this going to be an issue?

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

xMRi
Tomato Guru

Germany
285 Posts

Posted - Feb 19 2020 :  05:56:31 AM  Show Profile  Reply with Quote
Thanks for your understanding. ;)

When I think about other structs and functions: I would say don't care... show them.

.h and .cpp file form a unit form my point of view. So I would be happy to see all the definitions belonging to this unit.

My idea was to evtl. change the color (gray) or dim the symbols, so one can see that the symbols reside in another file.

Regards.

PS: I am a real happy user of VA-X, it's the most important development tool for me!

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
16737 Posts

Posted - Feb 19 2020 :  12:10:13 PM  Show Profile  Reply with Quote
I have put in a feature request for this, to see what our developers make of this:

case=141916

the idea is interesting, if a little strange

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000