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
 Navigation Bar should at least match VS quality
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

IanB
New Member

Australia
7 Posts

Posted - Dec 14 2021 :  7:07:22 PM  Show Profile  Reply with Quote
I find with Visual Studio 2022 the main feature I keep coming back to Visual Assist for is the Navigation Bar. But increasingly the quality of what is displayed there does not match what Visual Studio gives by default.



Example #1 - Here is a simple std::map. The Navigation Bar is empty. But Visual Studio's tooltip is what I'd expect.



Example #2 - Here is another std::map where it does mostly pick it up. But there is a "using XXX = std::map<X, Y>" in play to make the code easier to read, which Visual Studio's tooltip uses but Visual Assist doesn't.

I'm happy to take alternate workflows for what I do. The tooltips in VS 2022 are fantastic, but it means taking my hands off the keyboard and using the mouse. That's what I find the Navigation Bar great for (when it works).

feline
Whole Tomato Software

United Kingdom
17995 Posts

Posted - Dec 15 2021 :  08:36:03 AM  Show Profile  Reply with Quote
I think we have two separate issues here. Example 1 should only happen if VA has no idea what "propertyValue" is. Do you often get a blank navigation bar, or does it only seem to happen when creating new variables via structured binding, as shown here?

Currently VA does not understand the new structured binding syntax, which is a known bug we are working on:

case=113210

The problem from VA's point of view, with example 2, is that in order to work correctly we need to work out the base type, behind the using statement, which is what is getting shown here. But at the same time there is a "nice" name with the using statement. If we start thinking about this, how far should we go? What happens when a using statement wraps a using statement? This already happens with macros for types.

You can show the IDE mouse hover tooltip with the keyboard, just place the caret where you want the information, and for me press Ctrl+K, Ctrl+I, which is mapped to the command:

Edit.QuickInfo

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

IanB
New Member

Australia
7 Posts

Posted - Dec 15 2021 :  09:13:53 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

Do you often get a blank navigation bar, or does it only seem to happen when creating new variables via structured binding, as shown here?



I am getting the blank navigation bar quite frequently - not just on structured bindings.

I removed the structured binding from Example #1 and it still happens:



quote:
Originally posted by feline
You can show the IDE mouse hover tooltip with the keyboard, just place the caret where you want the information, and for me press Ctrl+K, Ctrl+I, which is mapped to the command:

Edit.QuickInfo



Thanks!
Go to Top of Page

IanB
New Member

Australia
7 Posts

Posted - Dec 15 2021 :  09:18:23 AM  Show Profile  Reply with Quote
It only works if I change it to an iterator.



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17995 Posts

Posted - Dec 16 2021 :  10:06:44 AM  Show Profile  Reply with Quote
OK, this is rather odd. Can you please try adding the following test case to this file, preferably at the top, just in case we are seeing a cascade error caused by something further up the file confusing our parser.

I think this should be a valid test case, based on your screen shots. Is it? It compiles here, and using VS2022 and VA 2440.0, the VA navigation bar is showing the correct information for both loops, with the caret in both "second" and "important" inside the if statement inside the loop.

struct FelineVAMapData
{
	std::string important;
};
struct FelineVAMapProperties
{
	std::map<FelineVAMapData, FelineVAMapData> valueMap;
};
void FelineVAMapOperator(const FelineVAMapProperties &rhs)
{
	short nCounter = 0;
	// for range loop fails for user, but works for Feline
	for (const auto &kvp : rhs.valueMap)
	{
		if (kvp.second.important.length() > 0)
		{
			nCounter++;
		}
	}
	
	// iterator loop works for user, and for Feline
	for (auto iter = rhs.valueMap.cbegin(); iter != rhs.valueMap.cend(); ++iter)
	{
		if (iter->second.important.length() > 0)
		{
			nCounter++;
		}
	}
}

I have tried to make sure the symbols names won't clash with anything in your code, so this should be a straight forward test.

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

IanB
New Member

Australia
7 Posts

Posted - Dec 16 2021 :  4:59:58 PM  Show Profile  Reply with Quote
Thanks for the reply.

I pasted in your code. Same behaviour for me - fails for the first (both 'second' and 'important') and works for the second. Selected Tools > Reparse Current File. No change.

I then created a brand new project. Pasted the code in (added includes + main) and compiled. Same behaviour. Fails for the first, works for the second.

Using VS2022 and VA 2440.0.

I've now done a reinstall of VA 2440.0, which triggered a full reparse. It is now working for both.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17995 Posts

Posted - Dec 17 2021 :  07:05:58 AM  Show Profile  Reply with Quote
Thank you for the update, this basically tells us that something became corrupt, or perhaps just badly confused, in VA's symbol database.

Hopefully this was a one off problem, but it is possible it will come back again if the trigger is something in your solution or libraries that confused VA. Obviously if you run into this problem again, or any other problems or questions please do just let me know, and I will do everything I can to help.

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