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
 Technical Support
 Subnodes of a method in VAOutline
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

turuk
New Member

Spain
6 Posts

Posted - Feb 06 2017 :  08:59:00 AM  Show Profile  Reply with Quote
I have certain class methods quite long but structured in named blocks, things like

void Event(){

HANDLE(PaintCommand) 
....
END_HANDLE 

HANDLE(CtlChange)
.....
END_HANDLE

and so on.
}

I'd like to reflect that structure in VAOutline as subnodes of that long method. Any idea?

Thanks!

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Feb 06 2017 :  09:40:47 AM  Show Profile  Reply with Quote
Have you considered using Extract Method to separate these out into separate methods? This is bypassing your question, to be fair, but if the method is so long seeing its internal structure like this would help, then it has to at least be suggested

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

We are considering allowing VA Outline to show you some form of overview of the current function, but this is just an idea at this stage, and I am not sure if / when we will try this:

case=57709

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

turuk
New Member

Spain
6 Posts

Posted - Feb 06 2017 :  1:15:40 PM  Show Profile  Reply with Quote
Yes probably implementing all this in separate methods would make sense but there's a ton of material working and you know what not to do with what's working. I had to try asking :-)

By the way, one thing that I tried in the meantime is re#defining HANDLE(Something) in va.stdafx.h like this:

#define HANDLE(Q) class Q##___{
#define END_HANDLE };

And it's not working, it does nothing, although if I write that code directly inside the function it's displayed well on VAOutline (a subnode with the name "Something__"). Should I insist on this line? By the way I'm on VStudio 2008

Thanks!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Feb 06 2017 :  2:30:03 PM  Show Profile  Reply with Quote
It is always worth asking, sometimes the feature you want already exists, you just need to know where to look

The macro approach is interesting, I had not thought of nesting classes inside the function, but it does make sense. One reason this is failing is that currently VA does not expand the ## macro command. The preprocessor gets to do this easily since it gets to rewrite the file as it goes, but that's not an option for us. I will have a look and see if I can get a version of this working here.

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

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Feb 07 2017 :  3:56:29 PM  Show Profile  Reply with Quote
Sorry, no luck here with macros. This is not something VA Outline is currently designed to do, and while we can both trick it into doing this by adding extra structure inside the function, it only seems to work with the structure added directly, rather than via macros.

If you want to try a few more experiments with macros yourself, you might find this setting helpful:

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

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

turuk
New Member

Spain
6 Posts

Posted - Feb 08 2017 :  03:38:00 AM  Show Profile  Reply with Quote
Thank you! I will play with that and let you know if I find something interesting.
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