Just finished a big refactoring which led to deletion of a bunch of files. Our large solution is under Subversion, so the process of deleting a file looked like:
- search with Resharper if class is not used anymore
- locate it in windows explorer
- delete file with TortoiseSVN
- finally, come back to Visual Studio and delete file from solution.
Huh! Not simple, not fast. No surprise, that longest operation was locating file in Windows explorer. But I way lucky enough to remember that I had installed a small but very helpful add-in – CoolCommands 4.0. One of his really cool commands is that from a opened file’s context menu you can “Open containing folder” that not only opens right folder, but also highlights the file. Cool, no?
This is the case when having right tools around and using them can save you enough time to write a small blog post make you more productive developer.
Unfortunately, CoolCommands doesn’t have a dedicated site and last place where you can find a download link is comments for this post on Gaston’s Milano blog. Direct link to download latest version – CoolCommands 4.0.
And, as a follow up, a list of “cool commands”:
- Collapse all projects
- Command prompt here
- Open project folder
- Demo font
- Send by email
- Copy reference
- Add as string resource
- Visual Studio Prompt Here
- Copy Reference.
- Locate in solution explorer.
And a picture to help explain how you can find the commands:
I like the tools like this. They make you go faster, feel smarter and program better. Enjoy!
This blog is about things I'm passionated - Software Development, User Experience, gadgets and few other facets of IT that are keeping me busy at work as well as fueling my knowledge and self-improvement demons.
#1 by Fyodor Sheremetyev on November 2, 2007 - 05:54
Using VisualSVN you can simple delete/copy/rename file in Visual Studio and VisualSVN will do the rest.
#2 by varely on November 2, 2007 - 08:24
You’re right. VisualSVN can simplify a lot of things. Renaming, for example, is a pain when you’re do it with Resharper/VS/TortoiseSVN.
But when I tried it one year ago or so, he doesn’t impress me at all… I think i will give it another try, may be I’ll find it much more useful.
#3 by Ilya Ryzhenkov on November 2, 2007 - 11:06
What version of ReSharper do you use? We have that Alt-Shift-L shortcut in recent versions, which locates current file in Solution Explorer. Ah, and you even do not need that. Use Safe Delete refactoring. It will do most of the work for you – search if there are no references (warn if any), delete type, and delete file if it was last type in a file. Then you just hit commit in TSVN and mark all “missing” files to delete. Pretty simple.
#4 by Valeriu Caraulean on November 2, 2007 - 13:14
@Ilya,
First of all – thank you guys for ReSharper!
And for the trick with deleting missing files on commit – it worked just fine for me. It will save a lot of time for me in the future…
Thanks a lot & keep it going with R#