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
 Refactoring rename and derived classes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Stefan Maton
New Member

7 Posts

Posted - Sep 22 2006 :  05:46:37 AM  Show Profile  Reply with Quote
Hi,

I tried the rename refactoring tool and stumbled upon this:

I have a base class which has virtual functions. I have a lot of derived classes overloading those virtual functions. When I try to rename the function declaration of the base class, ideally VA should show up all function declarations within the derived classes so that it can change it accordingly. Unfortunately, it doesn't do that.

Is this an intentional behaviour or do I miss something?

Best regards,
Stefan

rodneys
New Member

7 Posts

Posted - Sep 22 2006 :  06:00:21 AM  Show Profile  Reply with Quote
Same problem here! I try to rename the method paint() in a base class:
class BaseClass
{
public:
virtual void paint() ;
}

In the derived class, Visual Assist only renames the
call to BaseClass::paint() but not the overwritten method:

class DerivedClass
{
public:
virtual void paint() // <- NOT renamed
{
BaseClass::paint() ; // <- renamed
}
}

Really bad because the compiler does not complain.
Go to Top of Page

rodneys
New Member

7 Posts

Posted - Sep 22 2006 :  06:04:14 AM  Show Profile  Reply with Quote
Tested with Visual Studio 2005 and

VA_X.dll file version 10.3.1535.0 built 2006.09.15
VAOpsWin.dll version 1.3.3.6
VATE.dll version 1.0.5.8
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 23 2006 :  01:42:23 AM  Show Profile  Reply with Quote
I think this is working the way we intended. But, I can see the merit in what you want it to do. I have added a case to add the feature.

case=2668

Joe Pizzi
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Oct 06 2006 :  7:57:48 PM  Show Profile  Reply with Quote
Case 2668 is fixed in 1538.

Rename in a base class changes overriding names in derived classes. Rename of a overriding member in a derived class does not rename within a base class.
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