Regionerate archive
An automatic layout enforcement tool for the C# programming language.
 

Main
Introduction
Tutorials
Download
Gallery
Blog
Documentation
Discuss
Source



 Subscribe in a reader

 Subscribe by e-mail



Ads Via The Lounge

Omer Rauchwerger
omer at rauchy dot net



New Version Available - v0.6.3.8, published Saturday, July 28, 2007

New Features:

  1. You can easily order your members by their length.
  2. Place delegates inside regions.

Bug fixes:

  1. Methods with multiple generic types are now recognized. (thanks chuggle)
  2. International characters are supported. (thanks Finger, tercm and nvoigt)
  3. Line breaks in field assignments issue solved. (thanks Finger)

You can download this version at the Downloads page.

Labels: ,


1 comments. Add a comment.


Code Layout Tricks: Region Styles, published Monday, July 23, 2007

If you read about Regionerate in blog posts, you are most likely to read that it is "a tool that creates regions automatically".
Most people don't understand that Regionerate is primarily about Code Layout and that #region is just one display style. Currently, Regionerate has 3 types of regions - Visible, Invisible and Comment.

If you take a look at the Code Layout schema, you can see that the CreateRegion statement has an attribute called RegionStyle which accepts any of the values mentioned above.
  • The Visible region style is the default style which will wrap your selection with #region-#endregion, for example:
#region Private Fields (3)

private string a;
private string b;
private string c;

#endregion
  • The Comment region style is a simpler style which will display a comment at the beginning of the selection, for example:

// Private Fields (3)

private string a;
private string b;
private string c;

This region style is very useful for regions inside regions which typically have a small amount of elements. For example:

#region Methods (3)

// Public Methods (2)

public abstract void A();
public abstract void B();

// Protected Methods (1)

protected abstract void C();

#endregion
  • The Invisible region style will display only the selected items without any header or footer, for example:

private string a;
private string b;
private string c;

This region style is ideal if you want to keep your code under a specific layout, but can't stand expanding and collapsing those annoying #regions.

Labels: , ,


0 comments. Add a comment.


New Version Available - v0.6.3.3, published Sunday, July 22, 2007

Just some bug fixes on this one, hoping to release some new features from the queue on the next version.

  1. Constraints appear to break regioning - fixed. (thanks bsorensen)
  2. A hopeful fix for some localization issues. (thanks nvoigt & Brettljausn)
  3. Multiline Enum Value Problem solved.

Since there are no new features on this one, a new Code Layout schema was not published, so no need to update your Code Layouts.

You can download this version at the Downloads page.

Labels: ,


0 comments. Add a comment.


Public Beta is One Month Old!,

Regionerate's Public Beta was first published on DotNetKicks on June 22nd, 2007.
Since then, over 15,000 people have visited the website and over 2,000 people downloaded Regionerate.

I just wanted to send a big thanks to everyone for all the kind words, suggestions and bug reports.

I'm hoping to release a stable version as soon as possible and get going with the new features of Regionerate v2.0.

If you like Regionerate, help me spread it by recommending it to your friends & colleagues.

Thank you for your support!
--rauchy.

Labels: , , ,


0 comments. Add a comment.


Code Layout Tricks: Placing Leftovers, published Tuesday, July 17, 2007

Member leftovers are instances of a specific member type which were not already placed by a previous PutX statement. Member leftovers are placed by a PutX statement with no restricting Where statements.

For instance, A <PutFields/> statement will place all fields that weren't already placed by previous <PutFields> statements.
A <PutMethods><Where><IsConstructor Equals="true"/></Where></PutMethods> will place all constructors which weren't placed by previous <PutMethods> statements. (see example at the bottom)

Take this Code Layout Snippet as an example:

<PutFields><!-- First -->
<Where><Static Equals="true"/></Where>
</PutFields>
<PutFields/><!-- Second -->


Run it on this piece of code -

public class WorkItem
{
private string _a;
private static string _b;

private readonly string _c;
}


and you will get -

public class WorkItem
{
private static string _b;
private string _a;
private readonly string _c;
}


The first <PutFields> statement in the Code Layout snippet will place "_b" and the second <PutFields/> statement will place all the leftovers ("_a", and "_c").

How is this useful, you ask? Well, placing leftovers can help you put some order in your regions without having to specify each specific case. For example, you might want to create a region for constructors, having all the public constructors appear first followed by the rest of the constructors.

Without leftovers, the Code Layout should have looked something like:

<CreateRegion Title="Constructors">
<PutMethods>
<Where><IsConstructor Equals="true"/><Access Equals="Public"/></Where>
</PutMethods>
<PutMethods>
<Where><IsConstructor Equals="true"/><Access Equals="Protected"/></Where>
</PutMethods>
<PutMethods>
<Where><IsConstructor Equals="true"/><Access Equals="Private"/></Where>
</PutMethods>
<PutMethods>
<Where><IsConstructor Equals="true"/><Access Equals="Internal"/></Where>
</PutMethods>
<PutMethods>
<Where><IsConstructor Equals="true"/><Access Equals="ProtectedInternal"/></Where>
</PutMethods>
</CreateRegion>

Using leftovers, the Code Layout can be reduced to:

<CreateRegion Title="Constructors">
<PutMethods>
<Where><IsConstructor Equals="true"/><Access Equals="Public"/></Where>
</PutMethods>
<PutMethods>
<Where><IsConstructor Equals="true"/></Where><!-- Leftovers -->
</PutMethods>
</CreateRegion>

Labels: , ,


0 comments. Add a comment.


New Version Available - v0.6.2.4, published Saturday, July 14, 2007

Three new features are included:


  1. Multiple Where statements are finally supported.
  2. Create regions for extern methods.
  3. Create regions for your enums.

Bugs fixed:

  1. Supporting nullable generic classes. (thanks gtsiokos)
  2. Enums are not scrambled anymore. (Well, this is a side-effect of adding suport for enums)

You can download this version at the Downloads page.

Labels: , ,


0 comments. Add a comment.


New Version Available - v0.6.1.7, published Saturday, July 7, 2007

Two new features are included:

  1. You can now filter by name and type using a regular expression. (Matthew - enjoy!)
  2. Filter type members by their attributes.

Also, three bugs are fixed on this one:

  1. OrderBy is now consistent (thanks MisterG)
  2. Custom symbols no longer corrupt #endregion declaration (thanks ggreig)
  3. The setting dialog's Edit button now opens the custom Code Layout in the IDE.

You can download this version at the Downloads page.

Labels: , ,


0 comments. Add a comment.


Share Your Code Layouts, published Wednesday, July 4, 2007

Regionerate comes with a default Code Layout which might be suitable pour moi, but might be annoying to others.
That's why I am searching for your favorite Code Layout for v1.0.

I know many of you have been playing around with the Code Layout, so if you feel comfortable with it, send it over to omer at rauchy dot net and I will add the it to the Gallery.

Before v1.0 is released, I will put a vote up, and the most popular Code Layout will become the default Code Layout for v1.0! (with acknowledgements to the creator, of course)

Labels:


0 comments. Add a comment.


From the Development Blog
From My Personal Blog
Read more news from
  • May 2007
  • June 2007
  • July 2007
  • August 2007
  • November 2007
  • December 2007
  • January 2008
  • August 2008

    Contribute
    I'm currently looking for good people to help me with the remaining development tasks for Regionerate v1.0. If you like Regionerate and want to be a part of it, contact me at omer at rauchy dot net.

    Release plan
    • Private Alpha (v0.2) -- complete.
    • Private Beta (v0.4) -- complete.
    • Public Beta (v0.6) -- complete.
    • Beta 2 (v0.7) -- current stage.
    • Release Candidate (v0.8) -- being developed.
    • Release (v1.0)



  • Omer Rauchwerger omer at rauchy dot net
    Feed me
    Distributed under the
    GNU general public license.