Delta Engine Blog

AI, Robotics, multiplatform game development and Strict programming language

CR_Commenter Update v1.4

I've done a little update of the CodeRush Commenter tool (click here for the full article). Basically I was annoyed of some old bugs like namespace commenting (which produces a compiler warning in vs2005) or auto-commenting of initialized variables inside methods with xml (again, a compiler warning, but this happend only if all commenting features were turned on).

Click here to download v1.4.
And here is the sourcecode for CR_Commenter v1.4.

Anyway, I fixed those things and added a couple of cool new features:

  • Fixed: No more Xml Generation of namespace sections or for variables in methods.
  • Fixed: All sections are updated, the first one is not skipped anymore.
  • Fixed: Using directives section generation works now fine with multiple lines for a single using statement.
  • Fixed: Structs, enums and switch statements to now correctly generate comments and xml comments.
  • New feature: Added a bunch of keywords to translate abbrivations to full names. This one is very cool, it makes the Commenter look smart because it will automatically generate meaningful comments for methods and parameters. For example "xPos" becomes "X coordinate position" or "bmp" becomes "Bitmap", "descNum" becomes "Description number", etc.
  • Also made some of the choices smarter where to generate which xml parameters, e.g. variables and classes do not longer use the return xml comment.

I've also started working on a couple of new features like automatic region generation and automatic refactoring of code and maybe supporting FxCop rules (automatically fixing them, since that is a lot of work by hand, many rules can be fixed automatically). But that is still a lot of work and I will continue that pursuit sometime later.

Wanna know some cool Visual Studio hotkeys? Here they are:

  • Ctrl + M + M: Expand/Collapse current selection.
  • Ctrl + M + O: Collapse all regions of the current file (very useful imo).
  • Ctrl + M + L: Collapse everything (not only regions, but also code blocks and comments).
  • F12: Go to definition (most useful hotkey ever, but not many people know about it ^^).
  • Shift+F12: Go to reference (vs2003) or find all references (vs2005).
There are millions more in VS->Tools->Options->Keyboard, but it is really hard to find anything there (way to thin list). For example I use F5 to Run (obviously), F6 to compile all, F7 to compile only selected, F8 to start (NUnit) test, F9 to debug test. The last 2 shortcuts work only in VS2003 and earlier VS2005 versions, on VS2005 RC I don't have any shortcuts available for Testing except the ones from VSTF. Does anyone know how to fix that?

Update: Found out why my hotkeys didn't work in VS2005, a complete removal (including all files and settings) of TestDriven.Net and reinstall did fix these problems finally :) F8 for unit testing again!

Comments are closed