Re: Great undocumented feature: foldable code with $REGION directive
From: Marcelo Carvalho (mc_nospam_at_arquivo.com.br)
Date: 12/04/04
- Next message: Douglas J. Horton: "Re: Old projects never die..."
- Previous message: Rudy Velthuis [TeamB]: "Re: My Latest CodeFez Article"
- In reply to: Mauro Venturini: "Re: Great undocumented feature: foldable code with $REGION directive"
- Next in thread: Mauro Venturini: "Re: Great undocumented feature: foldable code with $REGION directive"
- Reply: Mauro Venturini: "Re: Great undocumented feature: foldable code with $REGION directive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 4 Dec 2004 10:08:24 -0800
Hi Mauro,
I mentioned the Nick's suggestion from his article, that was
published some days after I found the directive.
About your tool, I couldn't make it work. I placed the
Regionalize.dll and the Regionalize.xml in my tools dir, adjusted the
reg file, but it didn't work. Then I tried removing the double slashes,
also tried inputting manually the data in the register, and last tried
to place the two Regionalize files in the BDS bin folder. Restarting
Delphi IDE between each attempt. There was no Regionalize option in the
Pop menu and the shortcut didn't work. The DLL remains unblocked, that
means unloaded.
I'm using D2005 Trial, WinXP SP1. Any restriction about the trial? Is
it for Win32 IDE?
And about the source, BEFORE reading the .txt file about correct
install instructions, I tried to open and compile the dpk file, but it
asked for a Visibles.dcpil file, not provided...
[][][][]
Marcelo.
BTW: How can I do to set an easy shortcut to "Fold Methods" and "Fold
Regions"?
Mauro Venturini wrote:
> You might be interested in Nick Hodges article at
> http://www.codefez.com/Default.aspx?tabid=79&newsType=ArticleView&arti
> cleid=51 and in my little submission at Code Central
> http://cc.borland.com/ccweb.exe/listing?id=22853
>
>
> "Marcelo Carvalho" <mc_nospam@arquivo.com.br> wrote in message
> news:41b1ddac@newsgroups.borland.com...
> > Hi,
> >
> > Having my first contact with C# IDE on D2005, I noticed a
> > different rectangle, that was "hiding" a piece of auto-generated
> > code. It was the #REGION directive. Than I saw the same kind of
> > region in the Delphi.Net IDE, as the {$REGION} directive.
> > Immediately I tried it in the Win32 IDE and. it worked!
> >
> > The syntax is:
> >
> > .
> > {$REGION 'Any title you want'}
> > .
> > // Any piece of code
> > .
> > {$ENDREGION}
> > .
> >
> > After typing it, when you place the cursor back on the {$REGION}
> > line, a small [+] appears near the line numbers - and you have a
> > foldable piece of code! Closing it provides a nice rectangle hiding
> > all code between the directives, showing the title you typed.
> >
> > This resource allow you to organize code easily, and is a great
> > complement for the similar foldable methods and procedures. You can
> > fold logical pieces of code, group code to turn complex structured
> > blocks easy to read, group procedures and functions by categories,
> > group variable declarations, and so on. You can even see all your
> > unit folded code in one single screen!
> >
> > The regions CAN be nested, and they keep the indentation of the
> > {$REGION} directive when folded. You can also customize it's colors
> > when folded and unfolded.
> >
> > Of course there's space for enhancements: The main one, as
> > pointed by Nick Hodges, would have some "Make selected code a
> > region" as a right click. Also I'd like to be have a parameter so
> > set color for individual regions (to categorize them), and have a
> > shortcut do fold all regions and methods...
> >
> > I was wondering why such great resource is undocumented, not even
> > being showed in the Borcons demos - it would be a success there, I'm
> > sure. My first thought is that maybe because it is derived from
> > some C# or VB resource. Observing many people being surprised when
> > I mentioned it I decided to share it here.
> >
> > [][][][]
> >
> > Marcelo.
- Next message: Douglas J. Horton: "Re: Old projects never die..."
- Previous message: Rudy Velthuis [TeamB]: "Re: My Latest CodeFez Article"
- In reply to: Mauro Venturini: "Re: Great undocumented feature: foldable code with $REGION directive"
- Next in thread: Mauro Venturini: "Re: Great undocumented feature: foldable code with $REGION directive"
- Reply: Mauro Venturini: "Re: Great undocumented feature: foldable code with $REGION directive"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]