Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactoring: Rename variable doesn't work

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
xMRi Posted - Feb 07 2017 : 03:15:04 AM
Here the code I have:

STDMETHODIMP CFoo::put_ShowParameter(VARIANT_BOOL pVal)
{
	AFX_MANAGE_STATE(AfxGetAppModuleState());

	// Need the init
	HRESULT hr = m_data.Init();
	if (FAILED(hr))
		return hr;

	m_data.m_bShowParameter = pVal!=0;

	return S_OK;
}


I point my cursor in the function header on the argument pVal.
I try to choose VAX Rename.

The cursor jumps on put_ShowParameter and only allows me to rename the function.

Selecting pVal and use rename again.Shows no match.

Using Build 2118.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 07 2017 : 11:24:31 AM
Thank you for the very clear example and description. I am seeing a similar result, the caret jumps for me, and I am left opening the VA Refactor context menu, via Alt-Shift-Q, on the function, not the parameter. When I trigger Rename directly on the parameter, some references are being found for me, but the function definition in the .h file is not being picked up. So clearly this is not working correctly:

case=103619

I am not sure why I am getting some references and you are not getting any references to the parameter though, that surprises me.

Can you please try running Change Signature on the function, and see if this renames the parameter for you correctly? This is working for me, so hopefully this will work reliably for you as well.

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