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
 Refactor Rename & Visual SourceSafe
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tharkaway
Junior Member

USA
11 Posts

Posted - Dec 12 2007 :  4:48:10 PM  Show Profile  Reply with Quote
I just upgraded to the lastest version of VA and noticed a significant difference in how refactor works vs. the prior release. If the Refactor-Rename of a variable failed because one of the files was read/only (i.e. could not be checked out), the old version used to undo the whole Refactor operation. The current version will leave the Refactor partially done with the results that the project in an uncompilable state.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 13 2007 :  07:50:23 AM  Show Profile  Reply with Quote
Which IDE and version of VA were you using?

Using VS2005 and VA 1561 I have just tested this. I have a class that is used in three files. I have made two of the files read only, and turned Off the IDE setting:

IDE tools menu -> Options -> Environment -> Documents -> Allow editing of read-only files; warn when attempt to save

to make sure that VA cannot modify these files. When I trigger Rename on this class focus jumps into one of the read only files, and the IDE "locks up", because there is a dialog with the title "Edit of Read-Only File" in the background that I cannot bring to the front.

As far as I am aware Rename with read only files has never behaved how you describe.

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

tharkaway
Junior Member

USA
11 Posts

Posted - Dec 13 2007 :  09:49:40 AM  Show Profile  Reply with Quote
I am using VS 2005 with no service packs and an older version of VA (maybe 1440).

I just tried this again with similar results to what I saw yesterday. Here are the details:

Using VA's refactor I renamed the symbol '_Selection' to '_Selectionxxxx'. This symbol is used in six different files, none of which were checked out of SourceSafe to me
One of these files however was checked out to a different user.

After starting the refactor, VAX/VS attempted to check out the file that was already checked out by another user. I was prompted to check out the file but since my settings do not allow multiple checkouts, the proper error messages were displayed. However the refactor continued with the next file, which could be checked out.

Interestinly, after each sucessful attempt, VAX attempted to open up the locked file again, for a total of six times. Eventually the other five files were refactored, however the project will no longer compile becasue of the one file that could not be checked out. The built in VS refactor would have rolled back any files it had changed once it came to a file that it could not check out.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 13 2007 :  2:32:18 PM  Show Profile  Reply with Quote
VA 1440 does not offer any form of refactoring.

I tried the same test as before, with simple read only files, in VA 1531. I see exactly the same effect with the hidden modal dialog.

After running rename a single undo should undo the rename in all effected files, leaving you back where you started.

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

tharkaway
Junior Member

USA
11 Posts

Posted - Dec 13 2007 :  3:35:40 PM  Show Profile  Reply with Quote
Thanks for your response. I was running 1440 but I am now running 1624 which gave the results I documented and which you have confirmed. I will remember to use the UnDo if I need to back out of a partial rename, or just use the VS rename.

I noticed that the VAX rename is quite a bit slower becasue it open up every file and repaints after each edit. Are there any specific advantages to useing the VAX rename vs. the VS version?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Dec 14 2007 :  08:29:34 AM  Show Profile  Reply with Quote
VA rename will show you the rename dialog, so you can check what is going to be renamed before you run the command. Also VA will also rename references in comments and strings, which can be very useful.

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