Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA 2443: quickactions on everything?

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Feb 14 2022 : 06:43:07 AM
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?






3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 14 2022 : 11:18:46 AM
Makes sense:

case=86418
Uniwares Posted - Feb 14 2022 : 08:58:04 AM
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.
feline Posted - Feb 14 2022 : 08:39:42 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000