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 2443: quickactions on everything?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Feb 14 2022 :  06:43:07 AM  Show Profile  Reply with Quote
With this build under VS2022 I get the quickactions "rename", "find references" (sometimes Modify Expression, which deadlocks on "protected") on just about everything. Guess a rename on "else" doesn't really make much sense, does it?






feline
Whole Tomato Software

United Kingdom
19054 Posts

Posted - Feb 14 2022 :  08:39:42 AM  Show Profile  Reply with Quote
I am seeing the same thing. Consider the following simple C++ example:

// on mouse hover VA Refactoring Context Menu is offered on "void" "short" and "else" in this function
// it is Not offered on "if" - even though Modify Expression is offered on "if", and makes sense
// VA is offering Find References and Rename on "void", "short" and "else"
short testRefactoringContextMenuKeywords()
{
	short nShortOne = 1;
	short nShortTwo = 2;
	if (nShortOne < nShortTwo)
	{
		nShortOne++;
	}
	// refactoring context menu offering Modify Expression on "else" makes sense
	// but Find References and Rename on "else" don't make sense
	else if (nShortOne == nShortTwo)
	{
		nShortOne++;
	}
	else
	{
		nShortTwo++;
	}
	// on mouse hover also offered on "return", but several of the options make sense
	return nShortOne;
}

simply not offering the hovering context menu on keywords isn't actually the solution here. Arguably it should be offered on "if", but it doesn't make any sense to offer Rename, or really Find References on keywords.

But if you have a macro for a keyword, then offering rename on that is probably reasonable.

So the question becomes, where to draw the line? My first thought is to say that Rename and Find References just don't make sense on keywords, but if anything else is being offered then it is reasonable to offer the context menu on mouse hover. Does this seem reasonable?

But having said that, is there ever a time when you would want to run Find References on a keyword? Renaming a keyword just seems really unwise, but finding all references to "virtual" in the current file, for example, might be helpful.

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

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Feb 14 2022 :  08:58:04 AM  Show Profile  Reply with Quote
Not really using much C++ lately, so there may be a difference in usability between C/C++ and C# where macros dont matter much. As for finding a "reference" on "virtual" or similar, I feel that the regular Find/Find in files is more adequate.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19054 Posts

Posted - Feb 14 2022 :  11:18:46 AM  Show Profile  Reply with Quote
Makes sense:

case=86418

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