Click here to Skip to main content
11,721,053 members (79,658 online)
Click here to Skip to main content

Code Snippet storage Add-in for VS.NET

, 3 May 2005 109.2K 780 85
Rate this:
Please Sign up or sign in to vote.
A Visual Studio .NET Add-in which allows storage of short code snippets.

Sample image

Introduction

Usually, frequently used code is most easily accessed via a DLL library. That being said, I have had many situations where I only need a single method or class from a large DLL. I was often hunting and searching many different projects for a certain piece of code, often not sure where I used it last. This Add-In stores snippets in an Access database, and uses a VS.NET Control Bar to facilitate access to these snippets.

Using the Add-In

  • Close any instances of Visual Studio .NET that you have been running.
  • Download and run the demo project, which is actually the MSI setup for the Add-In.
  • Open Visual Studio .NET.

When you open VS.NET, you will have a new toolbar in the corner of your screen that you can drag onto the VS.NET menu bar. Once the toolbar is dropped onto VS, there will be a single action button that will control all the actions of CodeDepot:

Clicking this icon will open the ComboBox menu for CodeDepot. There are three static entries in the ComboBox.

  1. [Collapse MenuBar]
  2. [Open CodeDepot Manager]
  3. [Reload Snippets]

Sample image

Snippets can be added via the CodeDepot Manager, and by a new menu item in the VS context menu. Just highlight the snippet you want to add and right click. Select the Add Snippet menu item:

Once snippets have been added, you can access them through the ComboBox drop menu, the action button must be clicked to load the snippet or perform the static action selected from the ComboBox. Once the snippet is loaded, all you need to do is paste it into your project.

Sample image

Note: I attempted to handle the SelectionChanged event of the ComboBox to avoid the multiple button clicks, but was unsuccessful. I'd welcome any suggestions to improve this interface.

Updates

Due to popular demand, I've added MS SQL Server support. The Code Manager now has a Settings tab at the top which allows the user to specify the path to the local database or use a network SQL Server.

Sample screenshot

The SQL credentials you provide must have owner rights to the SQL Catalog you specify, since the CodeDepot table will be created automatically. You can also switch between databases (local and SQL) at will.

Conclusion

I hope others find this Add-In as useful as I have, and since this is my first VS.NET Add-In, I welcome any suggestions on improving the UI or performance.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Guinness4Strength
Software Developer (Senior)
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
QuestionPort to VS.NET 2005? Pin
James Coleman26-Sep-07 11:28
memberJames Coleman26-Sep-07 11:28 
QuestionImprovement question Pin
frun15-Dec-05 2:45
memberfrun15-Dec-05 2:45 
AnswerRe: Improvement question Pin
Guinness4Strength15-Dec-05 3:41
memberGuinness4Strength15-Dec-05 3:41 
GeneralDidn't show up in VS.NET Pin
Daniel Monzert30-Jun-05 4:02
memberDaniel Monzert30-Jun-05 4:02 
GeneralRe: Didn't show up in VS.NET Pin
Guinness4Strength30-Jun-05 4:19
memberGuinness4Strength30-Jun-05 4:19 
GeneralRe: Didn't show up in VS.NET Pin
Daniel Monzert30-Jun-05 6:06
memberDaniel Monzert30-Jun-05 6:06 
GeneralRe: Didn't show up in VS.NET Pin
Guinness4Strength30-Jun-05 6:29
memberGuinness4Strength30-Jun-05 6:29 
GeneralRe: Didn't show up in VS.NET Pin
Daniel Monzert3-Jul-05 16:01
memberDaniel Monzert3-Jul-05 16:01 
GeneralSurrender. Pin
Daniel Monzert20-Jul-05 18:38
memberDaniel Monzert20-Jul-05 18:38 
QuestionGood job, but how can I edit or delete my snipet? Pin
secnet4-Jun-05 3:36
membersecnet4-Jun-05 3:36 
AnswerRe: Good job, but how can I edit or delete my snipet? Pin
Guinness4Strength4-Jun-05 13:51
memberGuinness4Strength4-Jun-05 13:51 
AnswerRe: Good job, but how can I edit or delete my snipet? Pin
Guinness4Strength4-Jun-05 13:53
memberGuinness4Strength4-Jun-05 13:53 
GeneralRe: Good job, but how can I edit or delete my snipet? Pin
secnet4-Jun-05 20:31
membersecnet4-Jun-05 20:31 
GeneralRe: Good job, but how can I edit or delete my snipet? Pin
Guinness4Strength5-Jun-05 13:19
memberGuinness4Strength5-Jun-05 13:19 
GeneralException on saving empty database Pin
_Hung_11-May-05 5:32
suss_Hung_11-May-05 5:32 
GeneralDataLayer Pin
Mike Aarset4-May-05 10:40
memberMike Aarset4-May-05 10:40 
GeneralRe: DataLayer Pin
Guinness4Strength4-May-05 10:43
memberGuinness4Strength4-May-05 10:43 
Generallittle bug! Pin
Francois Soucy25-Apr-05 14:29
memberFrancois Soucy25-Apr-05 14:29 
GeneralRe: little bug! Pin
Guinness4Strength26-Apr-05 5:41
memberGuinness4Strength26-Apr-05 5:41 
GeneralOrganizing the Code Snippets Pin
Charit16-Apr-05 15:07
sussCharit16-Apr-05 15:07 
GeneralRe: Organizing the Code Snippets Pin
Guinness4Strength18-Apr-05 3:28
memberGuinness4Strength18-Apr-05 3:28 
GeneralRe: Organizing the Code Snippets Pin
Charit18-Apr-05 19:14
sussCharit18-Apr-05 19:14 
GeneralSnippet Database Pin
Anntron24-Mar-05 8:33
memberAnntron24-Mar-05 8:33 
GeneralRe: Snippet Database Pin
Guinness4Strength24-Mar-05 8:41
memberGuinness4Strength24-Mar-05 8:41 
GeneralRe: Snippet Database Pin
Anntron24-Mar-05 9:58
memberAnntron24-Mar-05 9:58 
GeneralRe: Snippet Database Pin
Guinness4Strength24-Mar-05 10:30
memberGuinness4Strength24-Mar-05 10:30 
GeneralRe: Snippet Database Pin
Anntron24-Mar-05 11:12
memberAnntron24-Mar-05 11:12 
GeneralRe: Snippet Database Pin
Guinness4Strength24-Mar-05 11:22
memberGuinness4Strength24-Mar-05 11:22 
GeneralRe: Snippet Database Pin
Anntron28-Mar-05 3:52
memberAnntron28-Mar-05 3:52 
GeneralRe: Snippet Database Pin
Andrew Hanley28-Mar-05 6:21
memberAndrew Hanley28-Mar-05 6:21 
GeneralRe: Snippet Database Pin
Guinness4Strength28-Mar-05 7:26
memberGuinness4Strength28-Mar-05 7:26 
GeneralRe: Snippet Database Pin
Anntron28-Mar-05 7:36
memberAnntron28-Mar-05 7:36 
GeneralRe: Snippet Database Pin
Anntron29-Mar-05 11:11
memberAnntron29-Mar-05 11:11 
GeneralRe: Snippet Database Pin
Guinness4Strength29-Mar-05 11:16
memberGuinness4Strength29-Mar-05 11:16 
GeneralRe: Snippet Database Pin
abohmann15-Apr-05 3:39
memberabohmann15-Apr-05 3:39 
GeneralRe: Snippet Database Pin
Guinness4Strength15-Apr-05 4:42
memberGuinness4Strength15-Apr-05 4:42 
QuestionRe: Snippet Database Pin
jws08747-Sep-05 4:14
memberjws08747-Sep-05 4:14 
AnswerRe: Snippet Database Pin
Guinness4Strength7-Sep-05 4:17
memberGuinness4Strength7-Sep-05 4:17 
GeneralI cannot select my snippet Pin
Anonymous18-Mar-05 20:09
sussAnonymous18-Mar-05 20:09 
GeneralRe: I cannot select my snippet Pin
Anonymous18-Mar-05 20:12
sussAnonymous18-Mar-05 20:12 
GeneralShared snippet storage Pin
Kaimar9-Mar-05 23:49
memberKaimar9-Mar-05 23:49 
GeneralRe: Shared snippet storage Pin
jason_briggs5-May-05 13:58
memberjason_briggs5-May-05 13:58 
QuestionIsn't this what the Toolbox is for? Pin
Anonymous8-Mar-05 10:07
sussAnonymous8-Mar-05 10:07 
AnswerRe: Isn't this what the Toolbox is for? Pin
Guinness4Strength8-Mar-05 10:19
memberGuinness4Strength8-Mar-05 10:19 
GeneralRe: Isn't this what the Toolbox is for? Pin
Anonymous9-Mar-05 17:38
sussAnonymous9-Mar-05 17:38 
GeneralRe: Isn't this what the Toolbox is for? Pin
Guinness4Strength10-Mar-05 3:33
memberGuinness4Strength10-Mar-05 3:33 
GeneralRe: Isn't this what the Toolbox is for? Pin
jgrasmeder18-Mar-05 2:55
memberjgrasmeder18-Mar-05 2:55 
GeneralRe: Isn't this what the Toolbox is for? Pin
Guinness4Strength18-Mar-05 3:13
memberGuinness4Strength18-Mar-05 3:13 
GeneralRe: Isn't this what the Toolbox is for? Pin
Guinness4Strength18-Mar-05 4:22
memberGuinness4Strength18-Mar-05 4:22 
QuestionRe: Isn't this what the Toolbox is for? Pin
Member 369928623-Nov-09 1:47
memberMember 369928623-Nov-09 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150901.1 | Last Updated 4 May 2005
Article Copyright 2005 by Guinness4Strength
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid