![]() |
General Programming »
Macros and Add-ins »
VS.NET Add-ins
Intermediate
Regions Add-In for VS.NET 2003By JWTCreate an add-in for VS.NET 2003 to create regions. |
C#, VB, Windows, .NET 1.1VS.NET2003, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

I find I spend a lot more time than I would like adding newly created functions to existing regions or new regions. So for myself and anyone else like me, I have developed this add-in.
Two new commands are added to the context menu in the code window, when there is code selected.
Add To New Region will create a new Region, using the text supplied from a dialog, around the selected code.

Add To Existing Region will show a dialog allowing you to select which region the code should be added to. You can also use this function to create a sub-region by ticking the checkbox.

I have added a couple of new features.

This is a tool window that can be docked or floating, just like the Solutions Explorer and other VS tool windows.
The Region Explorer is not available and will be empty, if the current active editor window is a Design View or any tool window type (e.g. Start Page, XML, etc...).
Use the Region Explorer command on the View menu to show, and the close button of the control to hide.
Also in v2 is a setup dialog to allow some flexibility in the way the add-in is configured. This setup can be accessed from the Tools menu or from the button on the Region Explorer.
This version should work for C# and VB in VS.NET 2003.
It has not been tested under VS.NET 2002, but it will at least need the registry entries changing from:
HKEY_LOCAL_MACHINE\
SOFTWARE\
Microsoft\
VisualStudio\
7.1\
AddIns\
RegionsAddIn.Connect
to probably:
HKEY_LOCAL_MACHINE\
SOFTWARE\
Microsoft\
VisualStudio\
7.0\
AddIns\
RegionsAddIn.Connect,
although this is only supposition on my part.
If the v1.x version was previously installed, it should be removed using the following process, before installing v2.0.
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 11 Feb 2005 Editor: Smitha Vijayan |
Copyright 2004 by JWT Everything else Copyright © CodeProject, 1999-2009 Web17 | Advertise on the Code Project |