On this page
MVP
Microsoft MVP (since 2006) in the XNA/DirectX category

Tag cloud
Ajax (8) All (225) Arena Wars (21) Boo (4) BroodWar (8) Conferences (9) dasBlog (1) Development (54) Game Development (152) IronPython (5) Lost Squadron (17) Lua (7) meinSport.de (4) Other (163) Polynapping (12) Programming (167) Racing Game (10) Reviews (91) Rocket Commander (50) Silverlight (13) SQL (2) StudiHelp.de (2) XNA (52)
Categories
Navigation
Archive
| November, 2008 (2) |
| October, 2008 (1) |
| September, 2008 (1) |
| May, 2008 (2) |
| April, 2008 (14) |
| March, 2008 (1) |
| February, 2008 (3) |
| January, 2008 (4) |
| December, 2007 (2) |
| November, 2007 (2) |
| September, 2007 (2) |
| August, 2007 (2) |
| July, 2007 (10) |
| June, 2007 (6) |
| May, 2007 (9) |
| April, 2007 (11) |
| March, 2007 (10) |
| February, 2007 (3) |
| January, 2007 (1) |
| December, 2006 (4) |
| November, 2006 (13) |
| October, 2006 (1) |
| August, 2006 (14) |
| July, 2006 (5) |
| June, 2006 (7) |
| May, 2006 (9) |
| April, 2006 (5) |
| March, 2006 (8) |
| February, 2006 (8) |
| January, 2006 (2) |
| December, 2005 (9) |
| November, 2005 (7) |
| October, 2005 (5) |
| September, 2005 (2) |
| August, 2005 (5) |
| July, 2005 (3) |
| May, 2005 (2) |
| January, 2005 (2) |
| December, 2004 (16) |
| November, 2004 (12) |
| October, 2004 (8) |
Popular
Blogroll
Projects
Arena Wars (2004)

Rocket Commander (2006)

Pizza Commander (2006)

Rocket Racer (2006)

Coop Commander (2006)

Flower Commander (2006)

Fruit Commander (2006)

Euro Vernichter (2003)

Lost Squadron (2005)

Zombie Quest (very simple 2D Adventure, 2006)

Freifunk Hannover project (GoogleMaps support)

Older projects (2000 and earlier)

MeinSport.de - German Sport Community Site

About
About me: Contact

Email: 
Total Posts: 233 This Year: 0 This Month: 0 This Week: 0 Comments: 402
|
Made with
 |
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in anyway.
| | 
Sign In
|
Thursday, November 27, 2008 8:05:45 PM (GMT Standard Time, UTC+00:00) ( All | Development | Game Development | IronPython | Lua | Programming | Reviews | SQL | XNA )

I have updated my CR_Commenter plugin quite a lot last weekend and tested it all week. CR_Commenter v1.9 new features include full hotkey and feature customization, much better support for C++, Lua, Python and way better light-commenting features and more powerful and stable region features. Thanks to the many people writing me emails using the addin or even improving it themselfs and sending me updated code back (full thanks are listed below).
Download links for CR_Commenter v1.9 (2008-11-27):
If you do not know about the CR_Commenter
plugin for CodeRush yet (I originally wrote it back in 2004 and still
use it every single day), please read the article for version 1.8 from earlier this year where I also added a lot of features and this article of version 1.7 from 2006 or check out the original Commenter - A CodeRush plugin which helps you to comment your code article on CodeProject.net from 2004, which I have finally updated too (its about time).
To use CR_Commenter you need to install CodeRush 2.0 or later, which is a commercial product you can get from DevExpress here. You can also use the free DXCore component with a reduced feature set, but all the basic CR_Commenter features should work fine there too. Please note that there is also a recently released free CodeRush Xpress Edition, which should work too, but I have not tested it.
If you have used CR_Commenter before the first thing you will probably notice is the completely new options screen:

Let me go through all the new and improved features. Over the years so many things were added to CR_Commenter and since the options screen, hotkeys and feature set has changed so much all the time, it is hard to keep track what features are available in the latest version. To make it easier for new users to understand what you can do with CR_Commenter v1.9 I decided to explain every feature, which might also be useful for existing users as they might have missed some of the cool features before. All these features can now be enabled or disabled and you can set your own hotkey for most of them (if it makes sense). I will go through the same list as seen in the Options screen, which is also represented in the FeatureHotkey.cs class that has a lot of comments and explanations for each feature. As mentioned before all Hotkeys can be changed to whatever you like. Please note that the pictures might look a little different than your Visual Studio code, I just use a different theme and bigger font sizes, it is still Visual Studio 2008.
CR_Commenter v1.9 Features:
- Automatically add comments after closing blocks with }
Hotkey: }
This is the most basic feature of CR_Commenter. In v1.9 you can now enable or disable it as you like. Please also note that you can now specify to only generate comments for blocks greater than a certain size (by default 5), which reduces the amount of comments generated greatly and is also the new default setting! Note: Since this is only parsed after pressing } it only works for C like languages like C, C++, C#, fx, UnrealScript, etc. For some of the newly supported languages like Lua (or VB, which is still untested and more or less unsupported sadly) or even Python that use identation for blocks you have to use Ctrl+1

- Force Comment Block
Hotkey: Ctrl+1
Same as }, but allows us to comment whole classes and methods easier by positioning the text cursor on what you want to update. Use Ctrl+6 for always updating the whole file no matter where you are located. Can also be used for languages not using } for commenting or if you have disabled } commenting.

- Add namespace for the current word. (Disabled by default)
Hotkey: Ctrl+2
Used to support automatically adding a namespace in C# 3.0/VS 2008. Not longer needed since VS supports it on its own now! This feature could be used back in 2006 to add namespaces in VS 2005.

- Autogenerate region around the current block
Hotkey: Ctrl+3
Autogenerate region around the current block (method, property, constructor, etc.), for selections use Ctrl+R (default CodeRush hotkey). The most important thing about this feature is that it will automatically give your new region the method name and it will make sure all comments belonging to the method are put inside the region. Note: In the picture the #region SetNewValue and #endregion parts are hidden by CodeRush with lines to make the source code look cleaner.

- Autogenerate regions for the whole file (all methods)!
Hotkey: Shift+Ctrl+3
Same as Ctrl+3, but will go through the whole file and generate region blocks for every method that does not seem to have one yet! You can also just go to the class level and press Ctrl+3 to generate all regions for all class methods. Since v1.9 also works with C++ and will generate #prama regions for you. BTW: Parsing the whole file with Ctrl+1 will also generate a includes region automatically for you.

- Toggle collapsing and expanding current selection
Hotkey: Ctrl+4
Very useful to avoid having to use the mouse for these things. Please note that Visual Studio also supports collapsing sections with Ctrl+M+M, but that will only work on sections, not on regions, which is a pretty useless feature in C#, Ctrl+4 is much better :) Since v1.9 also supports regions if CodeRush does not parse them (e.g. #pragma region in C++), so you can now even collapse C++ regions.

- Toggle collapsing and expanding everything at top level
Hotkey: Ctrl+5
Will expand or collapse all regions in the current file at once. First time pressed it expands everything, second time everything is collapsed, good for getting a quick file overview. Note that again Visual Studio supports collapsing all sections with Ctrl+M+L, but this really sucks because all methods, xml comments and everything else is collapsed too and expanding all of that again is a pain. Again, Ctrl+5 is much better.

- Update all comments and xml blocks for the whole file.
Hotkey: Ctrl+6
Similar to Ctrl+1, but will not only process the current section, but the whole file. This generates and updates all comments in the whole file, updates the header comment and makes sure all Xml comment blocks are generated if missing (see below).

- Update just the header comment.
Hotkey: Ctrl+8
Force updating the header comment, can be useful to test new headers and to remove any old header data. Also updates the created and modified timestamps. Since v1.9 changing or having different header comments now works, but it will also remove any existing header comments to replace with the new header comment if the format is different. Also check out the new cool options in the Commenter options screen, which allows you to specify seperate header comments for each solution or project if you like.

- Generate xUnit or NUnit unit tests automatically for us
Hotkey: Ctrl+9
Generate xUnit unit tests automatically for us for all methods! All unit tests will have to be written and tested until everything is implemented correctly. Existing test methods will not be overwritten! You can either enable xUnit Tests (like in the screenshot below) or NUnit Tests.

- Remove All Comments, use this to cleanup a file
Hotkey: Ctrl+0
Remove All Comments, use this to cleanup a file. It will only remove generated comments (after } blocks). Also nice for testing and cleaning up other peoples code.

- Obfuscate whole file (removes ALL comments, xml comments, empty lines, headers, etc.)
Hotkey: Ctrl+\
Obfuscate whole file. All code will stay the same, but we will remove ALL comments, Xml Comments, empty lines, headers, etc. to reduce file size and make code harder to read. Not really a Commenter feature, but I implemented this for another app and it was easy to implement here too.

- Autogenerate XML Comments
This feature will automatically add XML Comments to methods, properties, constructors, classes, etc. when the normal comments or generated. You can specify if you only want to generate XML comments for public methods or if you want to generate XML tags for all parameters (which was default on, but is default off now to produce much less empty xml parameter comments, which are usually not updated by the programmer anyway).

- Other Improvements in v1.9
- Added cool new per-project and per-solution header comments
- New shortcut Ctrl+6 to just update the header
- Added lower limit for block size to reduce comments for small blocks (also works recursive)
- Added new features and hotkey logic, everything now easier to customize
- Easier visibility if plugin is installed and working (more visual events, better options screen)
- Fix generating comments for new files (messes up the using directives region), seems to be related to generating header comments
- Improve line length count for removing comments (good new standard: 5 lines)
- Fixed several problems in Format-Strings or SQL code.
- Added whole method identifier from the accessibility keyword to the closing parenthesis for region directives.
- Improved the CodeRush-autogenerated regions (Ctrl+3), make sure comments are not messed up
- New default: Do not generate Xml parameter comments (mostly not used for better documentation anyway, adding them yourself for more details is more comfortable)
- Added C++ "pragma region - #pragma endregion" support (thanks for testing to Enrico)
- C++: include includes into using directives region
- C++: Fixed header comment (project name could not be found)
- C++: Do not use xml comments, just leave normal comments!
- Fixed wronly generated regions outside of our plugin
- C++: Fixed #includes region, do not modify include lines
- Fixed region generation when CodeRush generates region before us!
- Fixed header in case some other header comment is used
- Added multiline header comment support for // /* */ -- and # to support all kinds of languages and comment formats
- Also force generate comments on properties (methods work, also test constructors)
- C++ allow Ctrl+4 and Ctrl+5 for C++ region collapsing (using visual studios Edit.ToggleOutliningExpansion and Edit.ToggleAllOutlining as fallbacks)
Older and Improved Features (from v1.8 and before):
- Fixed '}' inside string or comment, even if CodeRush has not processed the whole file yet (double checking now). E.g. the following string will not longer produce any comments:
SQL = String.Format("UPDATE GC SET Status = {0} WHERE ID = {1}", Msg, ID);
- Supporting to generate regions again, but split up function names, also suppress CodeRush region generation with Ctrl+3, Ctrl+R (also suppressing VS hotkeys now) Better support for auto generated region blocks for big methods, just press Ctrl+3 to generate region (let CR_Commenter choose the name automatically, allow editing after pressing Ctrl+3).
- Fixed #if DEBUG in Using directives (caused trouble, was removed)
- Also added code to always remove #if DEBUG and #endif, especially at the beginning and end of the Using directives region
- Fixed double line #using Using directives issue when using directives got mixed up.
- Fixed long line commenter generation, will now still work, but not longer cut of any of your code. If you have long code lines (>100 letters), you can still generate comments for them and the Commenter will not longer cut anything off (you are responsible for formating the code).
- Fixed auto-collapsing of regions, especially when closing blocks in methods, the method should not auto-collapse!
- Checked support with other languages (which are at least similar to C#) like Lua, Python, etc.
- In Python/Lua, etc. we had to disable } comment generation and also use other comments (# for python, -- for lua) when using Ctrl+1 for header generation.
- Test all other hotkeys and make sure they do not affect the code badly in CodeRush unsupported languages (note: VB is still not supported since it is very different from c# code).
- Supports now any unit test framework, actually does not care anymore what you use, only the unit test generation code will add Xunit, but you can easily change that code if you want to.
- Options are now available directly into Editor tree of the CodeRush options!
- Refactored all classes, added about 4 new classes and removed 1 unused class. The source code is now much easier to read, to follow and to change.
- Remove commented out code, cleaned up the source code a lot.
- And finally applied the commenter to the commenter source code :)
I would also like to thank all the people that wrote me emails, use the plugin, all my colleagues that use this tool everyday too (shoutout to Enrico Cieslik and Henning Thöle, and also Fabienne Khöle) and the following people who have contributed with ideas, code improvements and helpful bug reports (they are also mentioned in the TODO.txt file for their specific bug report or improvement idea): Andy (mangledmonster), Andrew Jones, Gil Yoder, Alexey Romanov, Enrico (Judge), Ed Blankenship, Sven Heitmann, Jan Diederich, Rob Heyes, Dan Avni, Andy Jacobs and everyone else :)
Sunday, November 02, 2008 9:06:01 PM (GMT Standard Time, UTC+00:00) ( All | Development | Game Development | IronPython | Programming | Reviews | Silverlight | XNA )
I watched quite a lot of PDC 2008 Talks this week and I really like
that they put all that stuff online for everyone to watch. To learn more about the PDC, check out event photos or see all the sessions, directly go to http://www.microsoftpdc.com/. Another good list of all sessions can be found here: http://coolthingoftheday.blogspot.com/2008/10/pdc2008-quick-video-link-list.htmlHere are my
personal favorite session recordings (from what I have seen, I have not seen all talks): The Future of C# (by Anders Hejlsberg)http://channel9.msdn.com/pdc2008/TL16/As always Anders is fun to watch and you learn a lot about C#, the new dynamic keywords and whats to come. Not really stuff you will probably use right now, but good to know what we can do and probably will do in a few years. In case you want to watch IronPython or IronRuby, this session is a good prerequisite too. Deep Dive: Dynamic Languages in Microsoft .NEThttp://channel9.msdn.com/pdc2008/TL10/Jim Hugunin (the creator of IronPython and DLR) talks about IronPython and the DLR (Dynamic Language Runtime) in general. Fun to watch, interesting insights and generally always interesting to anyone interesting in dynamic languages. Panel: The Future of Programming Languageshttp://channel9.msdn.com/pdc2008/TL57/I like Panels like this and they had really great guests: Gilad Bracha, Douglas Crockford, Anders Hejlsberg, Erik Meijer, Wolfram Schulte, Jeremy Siek. They get a little bit off-topic at the end, but overall an interesting and very fun to watch discussion with a lot of interesting arguments on all sides (lot of different languages are discussed). IronRuby: The Right Language for the Right Jobhttp://channel9.msdn.com/pdc2008/TL44/I have learned Ruby few months ago and used it for a few days, but I never really liked it and continued to use Python instead, but John Lam (the IronRuby inventor) is a cool dude and give a lot of tips and shows off a lot of cool demos, which are equally interesting even if you would use some other dynamic language than Ruby.
Microsoft Visual C# IDE: Tips and Trickshttp://channel9.msdn.com/pdc2008/TL46/Interesting and useful Tricks, Dustin shows off a lot of shortcuts
and the whole presentation is in Visual Studio, which is cool. Visual Studio Debugger Tips & Trickshttp://channel9.msdn.com/pdc2008/TL59/I like Tips & Tricks talks and this one is good too. Informative and fun to watch as well. I will probably watch it again some time soon, like I will with some of the other talks too (because I usually code or do something else while the videos are running on a secondary monitor ^^). Mono and .NET (by Miguel de Icaza)http://channel9.msdn.com/pdc2008/PC54/One of the last talks I discovered after watching many other talks. At first I thought this might be not really interesting for me, since this will probably focus only on Linux and Mono development, but I could not be more wrong. This was a really great talk, Miguel is such a great presenter, even when things go wrong, he makes fun remarks and is always on the topic. He gives great insight of game programming on Mono for Linux, the Mac and even the iPhone, which sounded really cool to me. Other topics were also interesting and fascinating. Managed Extensibility Framework: Overviewhttp://channel9.msdn.com/pdc2008/TL33/
If you were every interesting in extending Visual Studio or want to hear about good ideas on how to extend frameworks or applications, this talk is helpful and insightful. Visual C++: 10 is the New 6http://channel9.msdn.com/pdc2008/TL13/I'm not doing much C++ coding anymore, but many years ago this was my main programming language and it is still the most used language for games. This talk is highly informative and Boris Jabes talks in detail about new C++ Features in VS2010 and what is possible, what will get better and what even features will come in the future after VS2010. Also a lot of interesting questions and answers at the end. The two talks Parallel Programming for C++ and Parallel Programming for Managed Developers were also highly informative and gave us programmers some good ideas on how to make better use of Multi-core systems. I especially like the Talk Parallel Library (TPL), which is insanely easy to use: Parallel.For(0, 100, i => a[i] = a[i] * a[i]);
Microsoft XNA Game Studio: An Overviewhttp://channel9.msdn.com/pdc2008/TL43/Frank Savage from the XNA Team talks about XNA Game Studio 3.0, which is highly informative if you don't know much about XNA yet. For me there was not much new to learn in this talk, but Frank is such a cool guy and it is fun to watch how he presents his stuff, which is one more reason to watch this talk. He also shows off some XNA games and the recently XNA Dream Build Play contest winner games. The keynotes from Day 1 (Azure, Infos) and Day 2 (Windows 7, Visual Studio 2010 and .NET 4) were also interesting to watch. Other sessions sounded also interested and from what I have seen Oslo, Azure, Silverlight, Unit Testing in VS2010 and other new stuff is cool too, but I have no plans to use that stuff anytime soon (maybe Oslo for parsing text, which is easy and cool). I hope you enjoy these videos as much as I do, definitely a great idea to put them all online :)
Sunday, October 12, 2008 4:15:53 PM (GMT Standard Time, UTC+00:00) ( All | Development | Game Development | Programming | XNA )
Since I'm not posting many XNA articles lately, lets announce some stuff from Ziggyware :)
Ziggyware Fall 2008 XNA Article Contest
Start date: October 12'th 2008
Ending Date: November 30'th. (Midnight CST)
Contest Subjects
- Write an XNA related tutorial for XNA developers (see examples)

Important: Read How to create an article for Ziggyware - Entries are subject to approval and may be disqualified per disgression.
Prizes
- First Place
- XBox 360 Elite (USA NTSC)
- One Year subscription to the Microsoft XNA Creators Club
- Second Place
- One Year subscription to the Microsoft XNA Creators Club
More information can found at Ziggyware.com:
http://www.ziggyware.com/news.php?readmore=905
Saturday, September 13, 2008 10:54:56 PM (GMT Standard Time, UTC+00:00) ( All | Game Development | Other | Programming | Reviews | XNA )

Hi Folks, sorry for not updating my blog for such a long time. I basically had no time and not much interesting to report. Since I will focus more on game programming again in the near future, more blogging might happen again :) Anyway, yesterday I was an interview partner on a German TV show called "neues", which can be seen on TV Sundays each week at 16:30 (4:30 PM). The topic is user generated content and I will answer some questions in the second half of the show. Since the show is not technical, it might not be of much interest for game developers, but hopefully the general public can learn a bit about XNA and the cool opportunities everyone has with developing games on their Xbox 360 or Windows PC. It was a very interesting experience seeing how a show gets created, how many people are involved and how often it is rerecorded until everyone is happy. The people at ZDF/ 3sat were also very nice and it was fun to work with them. The show will also be available on the 3sat video archive online (probably in the next few days): http://www.3sat.de/mediathek/mediathek.php?query=*&red=neues&mode=searchUpdate 2008-09-14: Direct link to the video from the 3sat mediathek: http://www.3sat.de/mediathek/?obj=9543
Some pics from my journey to Mainz where the TV show was recorded. It was quite a long trip taking about 5 hours reaching Mainz. At Frankfurt I moved from the ICE (fast train, but the power supply did not work so I could not even use my laptop, grr) to a slower train called RE (which does not supply any power to the train riders).
The weather was not very enjoyable Friday. In the morning it was raining very much.
Since I was not allowed to take any pictures inside the studio and due the bad weather I took not many photos. Hopefully I can post a small video once the 3sat video from the show is available.
Getting back home was the same ride in reverse. I did not spend much time in Mainz or Frankfurt due the bad weather and I was kinda tired so I played a few games I wanted to check out (like Spore and Space Siege) in the train. This ICE at Mainz was going in the opposite direction, seems like not many ICE trains drive from Mainz to Frankfurt, so I had to take a slow RE train again.
And finally in Frankfurt at the MUCH bigger train station. They have about 30 rail tracks there and you can see a lot of people wearing business suits. Probably all bankers and investors, hehe ^^
Okay, that's it. Maybe I will finish up some blog posts I have written in the last months, but never finished them due lack of time and motivation. Take care!
Tuesday, May 13, 2008 7:52:57 AM (GMT Standard Time, UTC+00:00) ( All | Development | Programming | Silverlight )
As you can read on Scott Guthrie's Blog the Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta can be downloaded now. It has a amazing set of features and improvements and I highly recommend it, especially if you live on the bleeding edge :) I like the VS IDE and ASP.NET Routing Engine (previously part of the new ASP.NET MVC framework) the most.
David Hayden has summarized the list of changes (Scott's Blog posts are usually very long ^^):
- ASP.NET Dynamic Data - The wonderful ASP.NET RAD Data Scaffolding Support similar to what you get from Ruby on Rails.
- ASP.NET Routing Engine - The routing engine we have been enjoying in the ASP.NET MVC Framework and ASP.NET Dynamic Data.
- ASP.NET AJAX Back/Forward Button History Support - What you know and love from the ASP.NET 3.5 Extensions
- ASP.NET AJAX Script Combining Support
- Haven't seen this one before. It allows you to declaratively define
multiple script references within a new custom tag.
- Visual Studio 2008 Performance Improvements HTML Designer and HTML Source Editor - Always good to see :)
- Visual Studio 2008 JavaScript Script Formatting and Code Preferences
- Better Visual Studio Javascript Intellisense for Multiple Javascript/AJAX Frameworks - This will help with jQuery, cool!
- Visual Studio Refactoring Support for WCF Services in ASP.NET Projects
- Visual Studio Support for Classic ASP Intellisense and Debugging - Need this for ASP.NET MVC Framework Views.
- Visual Web Developer Express Edition support for Class Library and Web Application Projects
- SQL Server 2008 Support
- ADO.NET Entity Framework and LINQ to Entities - We expected this. Awesome!
- ADO.NET Data Services (formerly code-named "Astoria") - This is awesome, too!
- C# - The C# code editor now
identifies and displays red squiggle errors for many semantic code
issues that previously required an explicit compilation to identify.
Every little bit helps.
Read all this in more detail on Scott's blog or just download VS2008 SP1 Beta.
Thursday, May 08, 2008 8:34:02 AM (GMT Standard Time, UTC+00:00) ( All | Development | Game Development | Programming | Reviews | XNA )

As you can read on the XNA Team Blog the first CTP (kinda early beta/alpha) for XNA Game Studio 3.0 is available for download now. The major new features beside full VS 2008 (Express, Standard, Pro, etc., but not longer VS 2005) support you can now write and deploy games for the Zune. Luckily for me I own one (not many non-US people do since the Zune is ONLY available in the US). Please note that while the Zune is a powerful device it obviously will NOT support any advanced rendering techniques at all, but all the other parts of the XNA Framework are supported very well. This means 3D games or shader based games will be possible on the Zune and the display is just 320x240 pixel and there are other things you have to think about (controls and playing music), but other than that it should be pretty easy to start developing Zune games right away :) While the new features are really cool and I definitely will check out the Zune development options (XNA MVPs already saw some cool samples and stuff at the MVP Summit about this ^^), the show stopper for me is the " no 64 bit support" issue. All my PCs (work, home, laptop and even the servers) run on 64 bit vista/win2003/win2008, it will not be easy to play around with XNA 3.0 ("Hey, go away from that PC, I wanna test something"). Anyway, check out XNA Game Studio 3.0, especially if you own a Zune and find this Zune-targeted game development cool. Other features worth checking out are better sound APIs in the new Media namespace, namely the SoundEffect and MediaPlayer APIs. They allow you to play sounds and music much easier and in more formats (yeah, mp3s).
Monday, April 28, 2008 9:10:47 PM (GMT Standard Time, UTC+00:00) ( All | Development | Other | Programming | Reviews )

I worked on the CR_Commenter v1.8 Update all weekend and tested it a little bit today at work. If you do not know about the CR_Commenter plugin for CodeRush yet (I originally wrote it back in 2004 and still use it every single day), please read this article of version 1.7 from 2006 or check out the original Commenter - A CodeRush plugin which helps you to comment your code article on CodeProject.net from 2004
Here are the coolest new features in v1.8:
- New and updated hotkeys, also made sure all of them work as advertised! You can also now switch on and off much more features and hotkeys if you like (e.g. disable Ctrl+1, Ctrl+3 or Ctrl+.). Normally the commenter will do his work every time you press '}' while coding and automatically add comments, xml blocks and the header (no need for any hotkeys during normal coding). But you can also press the following hotkeys to perform special actions:
- Ctrl+1: Does perform the same action as closing a block with '}', but can be used anywhere inside a method or class.
- Ctrl+2 or Ctrl+.: Adds a namespace for the current word at the cursor. Used to support automatically adding a namespace in C# 3.0 (back in v1.7), but now works the same way as VS 2008 plus saving you from pressing Enter to accept a namespace suggestion. If you like the VS2008 way better (allowing different namespaces), just disable Ctrl+. and VS will work as before.
- Ctrl+3 or Ctrl+R: Auto generate region around the current block (method, property, constructor, etc.), for selections use Ctrl+R. You can also press Shift+Ctrl+3 to process the whole file! This feature was originally added in CodeRush v1.5, but abandoned in v1.6 and v1.7 after CodeRush supported it internally. Now the feature is back with lots of improvements, auto generating regions all over the place and producing region names for you. Can of course be disabled if you like the CodeRush way better (having to type the region name yourself).
- Ctrl+4: Toggle collapsing and expanding current selection. This feature often caused trouble in v1.7 because it collapsed sometimes regions you were working in (e.g. method blocks with sub regions), now it will not longer disrupt your work and never close any region you are working on (except you want to with this hotkey).
- Ctrl+5: Toggle collapsing and expanding everything at top level. Very cool to quickly check out what this file is about, use it in conjunction with first generating all region blocks (Shift+Ctrl+3).
- Ctrl+6: Update all comments and xml blocks for the whole file. Was Ctrl+9 before and Ctrl+F9 even before that, this method is not required very often because Ctrl+1 handles most of this already. Please also note that Ctrl+7 was abondoned for now (resort language blocks and regions) because this feature is very complex and not implemented yet (see above for v2.0).
- Ctrl+9 or Ctrl+F9: Generate all unit tests automatically for us (I use F9 to test, Ctrl+F9 makes sense to generate tests)! This will add a sub class called Tests, which contains all public methods as tests, which will all fail by default. Then all unit tests will have to be written and tested until everything is implemented correctly. Existing test methods will not be overwritten! This features is the major improvement in v1.8 for me, it will add unit tests automatically for us at the bottom of file to provide 100% code coverage (all unit tests should fail initially, add and change code to make them work).
- Thought about auto sorting and removing namespaces for all files, but that works just fine with the new VS2008 Powertools.
- Fixed '}' inside string or comment, even if CodeRush has not processed the whole file yet (double checking now). E.g. the following string will not longer produce any comments:
SQL = String.Format("UPDATE GC SET Status = {0} WHERE ID = {1}", Msg, ID);
- Added option to not update comments on } (or Ctrl+1)
- Supporting to generate regions again, but split up function names, also suppress CodeRush region generation with Ctrl+3, Ctrl+R (also suppressing VS hotkeys now)
Better support for auto generated region blocks for big methods, just press Ctrl+3 to generate region (let CR_Commenter choose the name automatically, allow editing after pressing Ctrl+3).
- Press Shift+Ctrl+3 to generate all regions at once for the whole file! The commenter will also not longer produce regions were you already have some (even if they are different), especially if you press Ctrl+3 multiple times you will see what I mean ^^.
- Fixed #if DEBUG in Using directives (caused trouble, was removed)
- Also added code to always remove #if DEBUG and #endif, especially at the beginning and end of the Using directives region
- Fixed double line #using Using directives issue when using directives got mixed up.
- Fixed long line commenter generation, will now still work, but not longer cut of any of your code. If you have long code lines (>100 letters), you can still generate comments for them and the Commenter will not longer cut anything off (you are responsible for formating the code).
- Fixed auto-collapsing of regions, especially when closing blocks in methods, the method should not auto-collapse!
- Checked support with other languages (which are at least similar to C#) like Lua, Python, etc.
- In Python/Lua, etc. we had to disable } comment generation and also use other comments (# for python, -- for lua) when using Ctrl+1 for header generation.
- Test all other hotkeys and make sure they do not affect the code badly in CodeRush unsupported languages (note: VB is still not supported since it is very different from c# code).
- Supports now any unit test framework, actually does not care anymore what you use, only the unit test generation code will add Xunit, but you can easily change that code if you want to.
- Options are now available directly into Editor tree of the CodeRush options!
- Refactored all classes, added about 4 new classes and removed 1 unused class. The source code is now much easier to read, to follow and to change.
- Remove commented out code, cleaned up the source code a lot.
- And finally applied the commenter to the commenter source code :)
Some cool and highly complex ideas (like the auto refactoring and resorting of all code elements in a file) did not make it into v1.8 and will probably lay on ice for a while until I start developing CR_Commenter v2.0. But other than that I'm pretty happy with the new version and both the new region generation code and the new unit test generation code is really helpful, plus the many fixes and improvements of existing features make it more enjoyable to use CR_Commenter.
Download CR_Commenter v1.8 here (free as usual, you will need DXCore, which you can download here freely):
Sunday, April 20, 2008 4:08:24 PM (GMT Standard Time, UTC+00:00) ( All | Conferences | Other | Reviews )
This is the final post of my picture set (7 Days of posting pictures, uff). Nothing much happened on Friday. I just woke up in the hotel, posted the Thursday post, watched some more GOM TV StarCraft Videos and finally left to the Seattle Airport. My camera batteries were depleted and most of the pictures were not recorded because of that. From time to time I was able to shake the batteries enough to make one or two pictures ^^

I hope this is not the plane that will take me all the way back to Europe :)
|

After basically just walking over to the gate the plane was not there yet. I expected one or two hours of security checks and waiting like in the past, but it took maybe five or ten minutes to walk through that. Strange .. maybe it was early or just luck.
|

Ah, there is my plane. My laptop batteries are almost dead by now and I will read the book I brought along (Digital Fortress). Sleeping in the plane is not an option, way too uncomfortable and too noisy.
|

Bad weather in Frankfurt - Germany. We slided quite a bit on the water on the runway. By now it is actually Saturday because of the 10 hour flight plus the 9 hours time difference.
|

Cool secret underground tunnel. The airport was so packed, it took over an hour to get to the security and finally reach my gate just in time. And all that stress just to find out that my plane to Hamburg has not arrived yet and will be 30 minutes late.
|

Finally reaching Hamburg Airport (looks much smaller, doesn't it?). It is about 1:00 PM here now and I'm awake for 18 hours now.
|

Not only is Hamburg Airport much smaller, there are no train connections. You have to take a bus first and then drive all around the city. Next time I will probably take the Airport Express Bus, which drives directly to Hamburg Hauptbahnhof (main train station). It is quicker to get back home from there for me.
|
I hope you enjoyed my pictures. Sorry for any misspellings I might have made, just contact me to fix links or names. Most of the time I wrote the text in a bus ride or while listening to a session. Next I will probably blog a little bit about ASP.NET MVC, Silverlight and/or IronPython.
|
|