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
 Right-Click Refactor on Partial Classes
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

John_H_Bergman
Tomato Guru

USA
198 Posts

Posted - Mar 10 2009 :  6:42:46 PM  Show Profile  Reply with Quote
I have a partial class, that has about 15 or so parts (partial class extensions in other files).

When I right-click refactor and rename the class, it does not rename the class across all of the partial classes (even if they are in the same assembly).

John H. Bergman
CTO
SiliconZone


[email protected]

To Send email, remove the .online.

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Mar 10 2009 :  8:35:20 PM  Show Profile  Reply with Quote
If you trigger Find References on this class, how many files does VA list? Does it only list the current file, or does it find some of these 15 files?

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

John_H_Bergman
Tomato Guru

USA
198 Posts

Posted - Mar 11 2009 :  03:46:44 AM  Show Profile  Reply with Quote
It only lists the current file

John H. Bergman
CTO
SiliconZone


[email protected]

To Send email, remove the .online.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Mar 11 2009 :  10:24:12 AM  Show Profile  Reply with Quote
That is unexpected. I have a very simple C# form project here, and when I trigger Find References on the partial class derived from form VA lists 3 files.

Do you have the time to create a default C# form and trigger Find References on the main form class name, and see how many files VA finds?

I am testing in VS2005 and VA 1715.

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

John_H_Bergman
Tomato Guru

USA
198 Posts

Posted - Mar 12 2009 :  7:12:33 PM  Show Profile  Reply with Quote
I misspoke, it does find all of the partial class declarations; so I immediately tried to rename it, and it renamed the class that I right-clicked on, none of the other partial clasess, but it did rename all of the other references to the class.

John H. Bergman
CTO
SiliconZone


[email protected]

To Send email, remove the .online.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Mar 16 2009 :  1:54:11 PM  Show Profile  Reply with Quote
I do not understand.

What did VA rename, and what did VA not rename?

Was Find References finding the expected references? Find References and Rename should find the same items, but Find References is a better initial test, since it does not change anything. If this is clearly missing several references then we have a problem, and Rename is expected to show the same problem.

Using my simple default C# form project I have just renamed the partial class and all 3 files that VA had found via Find References were correctly updated by Rename.

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