Wednesday, September 28, 2011

Group your files like Visual Studio does its with this VS 2010 Macro...

Alkampfer's Place - Visual Studio macro to group files

"Visual Studio has the concept of grouping files together a feature used mainly from code generation tools to groups generated files under the main file, but this feature can be used even for your class, as shown in Figure1.

image

Figure 1: Two code files nested inside program.cs

There are a lot of reasons to group files togheter, you can use this technique for group partial classes definition or you can simply want to group logically related files, etc etc. The annoying stuff is that there is no menu in Visual Studio that permits you to obtain this result, but you can solve everything with a macro. Just open the Visual Studio Macro IDE and insert the following macro.

...

image..."

I thought this a cool hack that I don't think I've seen before. I don't know if I'd personally use it (as I don't think I'd organize my code that way, seems it would have issues when shared across a team, etc), but that doesn't mean I can't think it's cool... :)

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...