Visual Studio already has this functionality, but only to a certain degree.
Doing this manually in code is usually time consuming and painful if you have large classes. You can drag multiple members into the regions right from the VA Outline window. The most beneficial part of this is that the VA Outline window shows regions. Using the VA Outline window, you can drag & drop members of the class to change the physical location of the declarations in the class file. The overall refactoring options are a bit limited but the ones that are there are very useful. This is extremely helpful if you are trying to remove or comment out large methods or you’re trying to organize code using regions. Other options include copy/cut/paste items as well as deleting them. From the ‘Surround’ context menu, you can wrap the selected methods in a region or comment them out. The VA Outline window allows you to select multiple methods at a time. The VA outline window gives you a view of the class definition (methods, properties, regions, etc). Highlighting a bit of code and pressing the * key, Visual Assist X will surround the bits with /* */ for you. It comments out the entire line(s) using //. Visual Studio doesn’t allow commenting portions of code. If you’ve ever needed to comment out just a portion of code you have either used the ‘Comment out the selected lines’ option in Visual Studio or you’ve surrounded the code with /* */ manually. Spell check is smart enough to know when you’ve entered the name of a member which is nice because if you’ve ever typed code into Word, you know that member names usually get red squiggles. Visual Assist X checks your strings for misspelled words and provides red squiggles when you have a misspelling. After typing long strings for error messages, you start to wonder if you’ve spelled everything correctly. It seemed kind of silly at first, but it isn’t. I would like to see more of these features available in Visual Assist X.Īs I stated in previous reviews, I like the spell check. I also added many variates of this method such ‘Add Backing’ for properties with no backing. This prevents any possible name collisions. Note: For those familiar with dFactor, the Visual Studio add-in I developed, you know that I prefer to rename the field using an underscore prefix.
You can change the snippet for the encapsulation using the ‘Edit VA Snippets’ dialog so you can add your modifications as you see fit. The problem is that if the field is already proper case, you will get a dialog asking what to call it.
Visual Assist X uses a proper case version of the field name. The end result isn’t exactly how I like to encapsulate my fields since I like to rename the private field prefixed with an underscore and then set the property name to the original field name. Visual Assist X quickly encapsulates a field without any annoying dialogs. However, the Visual Studio implementation is annoying and cumbersome. Visual Studio already has this feature built in and includes a bunch of options that Visual Assist X doesn’t. The dialog initializes with an entire list of files in the solution and as you type what you want it narrows down the list using a ‘contains’ type of search so even if you’re not 100% sure what the file name is, you still have a good chance of finding it. Using the Open File in Solution feature of Visual Assist X it was extremely simple to find the file I wanted to open. When the solution has 10 or more projects this can become time consuming. Since I over organize my projects this means going down a few levels. Normally when I need to get to a specific file I have to navigate the solution tree. This feature doesn’t seem like much when used on a small solution so I made sure to use an extremely large solution and it was excellent. I used the points mentioned in the email to me from Kevin Sikes ( See review #2) as a starting point and working through a project to get a feel for the other features. Finally I was able to get around to re-evaluating Whole Tomato Visual Assist X (.0).