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
 VA Outline : miss items inside {}
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

almostPerfectVa
New Member

6 Posts

Posted - Jul 20 2020 :  01:21:38 AM  Show Profile  Reply with Quote
class A{
	class B{

	};
	void f(){
		class C{};
		{
			class D{};
		}
		class E{};
	}
};


The code is shown in VA Outline as :-



It missed "D".

------

In VA Outline, I also doubt what right-click>"Display Region" means. It doesn't show "#pragma region" inside a function.

Edited by - almostPerfectVa on Jul 20 2020 01:23:37 AM

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 20 2020 :  07:32:19 AM  Show Profile  Reply with Quote
VA Outline is designed to show an overview of the current file, so its not currently looking for regions inside a function, since this is to "narrow" in scope to be picked up. It is an interesting point though, so I have put in a feature request for this:

case=142480

As for your nested class, do you actually have much code like this? I can see having code nested like this with namespaces, but why with classes?

Still, its valid code, so VA should handle it, I have put in a bug report for this:

case=142481

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

almostPerfectVa
New Member

6 Posts

Posted - Jul 20 2020 :  9:35:46 PM  Show Profile  Reply with Quote
I wish VA Outline to show some kind of bookmark.

First, I tried to use "#pragma region", but VA Outline doesn't show it.
So, the code in OP is just my workaround.

Here is a code that more similar to the real one.

void calculateAILink(){
     ... very complex code ...
     
     //BOOKMARK A: house relation
     while(...){
         ... very complex code ...
         //BOOKMARK A.1 : the below code will gather team info
         {
             ... very complex code ...
             //BOOKMARK A.1.1 : serialize of all information need for 1 team
             for(...){

             }
         }
     }
     //BOOKMARK B: car relation
     .... inside also has B.1, B.2, B.2.1 etc
}

I don't have code much like this. I accept that it is a bad practice to have very long function.
Nevertheless, when I need to do (e.g. for game code), such feature can save a lot of headache.

In Resharper, I can bookmark by adding "#pragma //some description". It will be shown in its file structure.

It will be shown as :-


For me, VA Outline is cuter and agiler than Resharper's, so I wish to see that feature in VA Outline.


Edited by - almostPerfectVa on Jul 21 2020 03:33:51 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 21 2020 :  07:40:50 AM  Show Profile  Reply with Quote
Are you aware of VA Hashtags? They are actually designed for exactly this sort of thing, and in this case it looks like cross referenced hashtags would be ideal:

https://docs.wholetomato.com/default.asp?W574#cross

here I would do something like this instead:

void calculateAILink() {
	//... very complex code ...
	// #BOOKMARK_A section starts here

		// house:#BOOKMARK_A house relation
		while (...) {
			//... very complex code ...
				// team:#BOOKMARK_A the below code will gather team info
			{
				//... very complex code ...
					// serialize:#BOOKMARK_A serialize of all information need for 1 team
					for (...) {

					}
			}
		}
	// #BOOKMARK_B section starts here
		// car:#BOOKMARK_B car relation
	// ....inside also has B.1, B.2, B.2.1 etc
}


use Alt-Shift-G on any of the #BOOKMARK_A tags and the menu will list all of the cross references, allowing you to jump directly to them. You can also see them listed in the VA Hashtags window, which you can set to group by file if you want, to help you get a clear overview of the tags being used in the current file. You can also filter and thus search the hashtags window quickly and effectively, letting you quickly find the tag (bookmark) you want.

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

almostPerfectVa
New Member

6 Posts

Posted - Jul 21 2020 :  9:36:56 PM  Show Profile  Reply with Quote
Wow, I have never thought VA would achieve that far.
It is comparable to/can be a substitute for Resharper's bookmark e.g. Ctrl+(shift)+number.
Thanks! It is a nice feature.

I wish the VA Outline can show the HashTags, so I don't have to :-
1. open 2 panels (VA Outline + VA HashTags)
2. look back and forth from 2 different hierarchy ... it is quite difficult

Thanks!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 22 2020 :  05:52:42 AM  Show Profile  Reply with Quote
VA Outline and VA Hashtags are designed for quite different jobs, so they are going to show different information. Hashtags are designed to help you group together items that can, and normally are, scattered across several different files or even projects.

Have you considered using Extract Method, to separate out some of the code in these large functions?

https://support.wholetomato.com/default.asp?W155

I know this isn't always possible, or helpful, but worth mentioning in case it does help.

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

almostPerfectVa
New Member

6 Posts

Posted - Sep 07 2020 :  9:49:40 PM  Show Profile  Reply with Quote
Two months later, does it have been fixed?
Is there any bug tracker that I can access?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Sep 08 2020 :  06:24:33 AM  Show Profile  Reply with Quote
Unfortunately we have not made any progress yet on either the feature request or the bug report.

For the feature request, showing regions inside functions, have you tried using VA Hashtags instead? This feature is designed for something much closer to what you are looking for, and already exists.

We do have a bug tracker but it isn't publicly visible. You can always ask here for updates, and the thread should be updated when we fix an issue that is referenced in the thread.

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

almostPerfectVa
New Member

6 Posts

Posted - Sep 08 2020 :  9:50:50 PM  Show Profile  Reply with Quote
I tried.
VA Hashtags and Extract Method are very useful features, but not suitable for my worst situations.

I still want to group VA HashTags and VA Outline into 1 window, OR VA Outline to show inner class inside function correctly.
My current workaround is using another plugin but it is less than ideal.

Thank for the information.
Go to Top of Page

almostPerfectVa
New Member

6 Posts

Posted - Apr 14 2021 :  02:04:44 AM  Show Profile  Reply with Quote
A half year has passed. I just want you to know that I still want this feature (show bookmark in VA Outline).
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Apr 14 2021 :  11:32:11 AM  Show Profile  Reply with Quote
This is still a feature request we are considering, and it is good to know that you are still interested. Unfortunately I don't currently have an estimate for when we might look at this, but we have not forgotten about it.

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