Visual Studio Add-Ins: SmartOutline

SmartOutline is a tool for creating regions in your code without having to use Region / EndRegion tags. Available at http://submain.com/default.aspx?nav=products.smartoutline, this tool took third place in the Microsoft Visual Studio Extensibility Contest packages category.

SmartOutline is a product that’s easier to show you how it works than describe, so let’s look at a few pictures. Let’s say I have a simple if statement. Highlighting it gives me a new pop up, as you can see below.

[SmartOutline 1]

Clicking on the Create new SmartOutline Region command brings up the following dialog, where you key in the name for your region.

[SmartOutline 2]

In this example I’ve keyed in “My If Statement” for the name. Assuming I then check the “Collapse region” box, my code will update as you see below.

[SmartOutine 3]

 

Clicking the + button will expand my region back to the original state, as you can see.

[SmartOutine 4]

SmartOutline is useful for hiding long lengths of code that add safety but not value. For example, you might have to do a lot of validation to input parameters, but they don’t add to the real purpose of the method. SmartOutline is a great way to hide that.

You might assume that SmartOutline is altering the source files using Region tags and intercepting them. Not so, as this command window dump of the source file proves:

[SmartOutine 5]

 

Some useful situations to use SmartOutine to hide code segments might include:

  • Lengthy error handlers
  • Long parameter checks
  • Long comments
  • Code that is commented out, perhaps something for a future version or older version that you’re not sure you want to delete
  • Using (or Imports) sections
  • Entire Methods

These are just a few ideas, feel free to post a comment with your own thoughts.


My one complaint / wish list item for enhancement is that SmartOutline left aligns the name you give to the smart region. This breaks up the visual flow of indents. You can add spaces yourself when you give the name, for example I could have keyed in six spaces then “
My If Statement”, but if I were to indent the code later SmartOutline doesn’t change to reflect this. You should also know this is a VS2005 tool only, sorry 2003 users.


Overall a useful tool for adding to the readability of your code, well worth the download, and like many of the other tools mentioned so far, it’s free.

6 Responses to “Visual Studio Add-Ins: SmartOutline”

  1. Mark Ducan Says:

    I thought SmartOutlne was a Information manager. See it at http://www.SmartOutline.com

  2. ArcaneCode Says:

    Apparently there are two different products with the same name. SubMain, who made the SmartOutline I blogged about, also calls their product SmartOutline. If you follow the link in my entry above, you’ll see what I mean.

  3. Serge Baranovsky Says:

    Thank you for the great feedback and suggestions. We working on the VS2003 version, although there is no ETA at this point.

    Re the name confusion, we know it’s a bit of a problem. The original Add-In name is SmartOutline for .NET and the URL is http://smartoutline.net

  4. SubMain.Blog() Says:

    SmartOutline reviewed

  5. Brutellio Says:

    Hello. I enjoyed reading your website.
    Have a wonderful day and keep up the good work.
    Brutellio.

  6. ashish Says:

    Does it support Visual Studio 2010?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 64 other followers