Regionerate's Development Blog

Sunday, January 20, 2008

Tickets Migrated

After poking around phpBugTracker and milking out some data via phpMyAdmin I've migrated all the tickets from the (non-public) bug tracking system to the new project Trac system.

Since this was done manually, I migrated the open tickets, leaving the closed bugs back in the old system, hoping they will not come back to haunt us.

You can now view them in the Trac system.

Labels:

Thursday, January 3, 2008

Solution Upgraded to Visual Studio 2008

I think its time to move on, so starting on revision 341, the solution is in Visual Studio 2008 format.

Hope this doesn't cause any problems for anyone. Let me know if you need a Visual Studio 2005 duplicate.

Labels:

Monday, November 26, 2007

A Call for Framework-Specific Code Layouts

After releasing the Code Layout Browser, I want to expand the Code Layout library by adding framework-specific or content-specific Code Layouts. I'm talking about Code Layouts such as the "NUnit Test Fixture" Code Layout (an example of framework-specific Code Layout) or the "Plain Old CLR Object" Code Layout (an example of content-specific Code Layouts).

These Code Layouts are not designated to be primary Code Layouts, but are very useful when trying to standardize the usage of a framework or a certain coding style.

I've been getting great feedback regarding Contract First, NUnit Test Fixture and the POCO layout and want this to be appealing to more people by shipping more specific Code Layouts.

Can you think of frameworks this might be suitable for?

Labels: , , ,

Thursday, November 22, 2007

Code Layout on Steroids!

A nifty feature available on v0.6.7.2 is the Code Layout Browser.

When you hit Ctrl+R (or whatever you had your shortcut set to), the active document is Regionerated. But if you hit Ctrl+R and keep the Ctrl button down, you will be presented with the Code Layout Browser.

The Code Layout Browser is similar to the Alt+Tab window browser in Microsoft Windows. It allows you to choose which Code Layout to apply on your code.

You can browse through the different Code Layouts using the shortcut key (typically "R") while holding down the modifier key (typically Ctrl), similar to Alt-Tab.

The first item is always the Primary Code Layout (the one you chose in the settings form, be it the standard Code Layout or your own custom Code Layout). The first item is the most accessible item and is the one selected when hitting Ctrl+R without browsing.

The rest of the items are gathered from the "My Code Layouts" directory under your installation folder.

Labels: , , , , ,

Thursday, November 8, 2007

#if #endif Blocks Support

This has been stated as a known issue since v0.2 and I can't really say I solved it. Its quite a difficult problem since its hard to tell which blocks should come over which blocks (#if-#endif vs. #region blocks)

A relatively easy workaround was to ignore #if-#endif blocks and keep their members the same. I believe this will do for most cases.

Labels: , , ,

Wednesday, November 7, 2007

Curly Braces Issue Solved

I've been carrying this issue around since v0.2, basically what it means is when you have curly braces ({,}) which are not related to your code's structure (stuff like private string _foo = "lala}la";) it tips the balance of the rest of the structural brackets.

So if the following class was declared

   1:  public class Foo
   2:  {
   3:        string bar = "}";
   4:  }

Regionerate would have identified this as the entire class


   1:  public class Foo
   2:  {
   3:        string bar="}

Pretty annoying, I agree, but now I have found a solution for it.


Prior to construction, all curly braces which are inside string literals are replaced to {?} where ? is an angle bracket pointing at the original bracket.


For example,


   1:  private string _foo = "{";
would turn into

   1:  private string _foo = "{<}";
and


   1:  private string _bar = "}";


would turn into

   1:  private string _bar = "{>}";

 

This helps to keep the balance at all situations. After layout is applied the original code is fully restored.


This seems like a hack, but I don't think of it as one, as it does not interfere with anything else and Regionerate will never get around to constructing string literals so this will not impose any limitations in the future.


Labels: , , ,

Wednesday, October 17, 2007

Vote For New Features on v0.7

I've been collecting feature requests for a while now and its about time to start implementing them, or at least part of them.

The previous survey has helped me to prioritize my tasks so I'll ask for your help again.
As with the previous survey, I can't commit to any specific deadlines or promise any feature since this is a spare-time project. It will only help me to prioritize the list.

Some of the features in the previous survey are still not implemented, so these features are on this survey as well.
Some info on the features:


  • Multiple OrderBy commands - Sort by multiple values, e.g: "Sort by name and then by parameters count". (source)

  • Support for nested structs - Put nested structs in regions, just like nested classes. (source)

  • Regionerate existing regions' member - Recursively scan existing regions' members and Regionerate their internals. (source)

  • Monitor file save operation and automatically Regionerate before saving - Prevent the need to hit Ctrl+R every time you add a member and Regionerate the code automatically upon saving. (source)

  • Filter by Comment - The ability to create a region for all detached comment sections. (source)

  • Couple fields with exposing properties - A popular feature which was originally planned for v2.0. It allows you to create regions that will contain field + exposing property pairs. (source & another thought)

  • Span a single OrderBy command over multiple Put statements - Reuse a single OrderBy command (For example, order by name) over multiple Put statements (such as PutProperties, PutMethods, PutDelegates etc.) (source)

  • Better control over spacing - Allow complete control over how many spaces are added before, inside and after every region. (source)

  • Select which projects & files to ignore when running on solutions and projects inside the IDE - The rgn.exe console application and NAnt task allow you to select which projects & files are ignored by Regionerate. Allow this when clicking "Regionerate This" on projects & solutions inside the Solution Explorer in Visual Studio or Projects Pad in SharpDevelop (source)

  • Prompt before Regionerating entire solutions or projects inside the IDE - To avoid a major accidental change, prompt "Are you sure?" before Regionerating entire solutions or projects. (source)

  • Allow ''Regionerate This'' on solutions and projects to run in the IDE and not directly on files - Allow the user to select whether files are directly accessed by Regionerate (which disables the ability to undo, but faster) or that Visual Studio documents are accessed by Regionerate (which enables undo, but slows things up since it opens all files inside the IDE) (source)

  • Filter by matching a method's parameters - Allow to filter methods by matching a regular expression against their parameter list. This, among other things, will allow you to create better filters for event handlers. (source)

  • Auto refresh the Code Layout after changes are made - Monitor activities in the Code Layout file and refresh the Code Layout automatically instead of having to go to the settings dialog and do it manually. (source)

  • Regionerate subclasses, structs, an interfaces - (source 1, source 2)

Please let me know if I missed any requests.

Side note: I was thinking of setting the vote count on items from the previous survey to the result they had in order to give them a head start on newer features, but then I thought maybe users might have a different perspective on Regionerate so they should start at zero to avoid giving them an advantage, what do you think?

Labels: , ,