Monday, December 06, 2004 3:16 PM
Using CodeShare Client
There are two different tools that I built last week.
1. CodeShare Addin: CodeShare Addin is an plug-in for Visual Studio .NET IDE. You can invoke this addin right from the code window to save any snippets into the central database. However, this addin will only work in the code window and it will not work while editing any aspx, html or config file. So, if you need to save snippets from these editors, then you have to use the other tool (as described below).
2. CodeShare Client: The other tool which is built over the same infrastructure is CodeShare Client. It is a separate application that can easily integrate with any external application. The default installation provide extension to Internet Explorer. However, it is basically a windows form application which gets code from any parent application through the clipboard (Simple Copy/Paste mechanism). Thats why, it is very easy to integrate CodeShare Client in any application where the Addin won't work.
Integrating CodeShare Client with Visual Studio .NET:
VS.NET Integration through external tools is very simple. Use the following process to register CodeShare Client executable and also assign it a keyboard shortcut.
Step 1: Add to the External Tools
Goto Tools->External Tools
Add CodeShare Client: Select "CodeShareClient.exe" in the command text box.
Step 2: Map a shortcut key to this external tool
Filed under: .NET, Pet Projects
Press the Keyboard button and then write "Tools.ExternalCommand(n)" in the Show command containing text box, where n is the sequence of the CodeShare Client tool. You can get this number by selecting the Tools window and counting the external tools upto CodeShare Client.
Then assign some shortcut key for this tool. I used Alt+C, which is available and easy to use with Ctrl+C (Copy).
After performing these steps, you can easily invoke CodeShare Client from anywhere in Visual Studio.NET IDE. Ctrl+C, Alt+C is the sequence to follow.
Integrating CodeShare Client with Windows:
A while back, someone mentioned a free tool called Winkey to invoke any application through the Win+(Key) combination. So, you can easily use Winkey to map "Win+S" (or any other key) to invoke CodeShare Client from any application.