Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
IDE
Code Editor
Code Folding
Code Formatter
Error Insight
Formatting
Help Insight
Keymapping
Sync Edit
Syntax Highlighting
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/IDE/Code Editor/Code Folding
[ Add a report in this area ]
Report #:
20729
Status:
Closed
Enhance $region directive to accept parameters
Project:
Delphi
Build #:
9.0.1882.30496
Version:
9.0
Submitted By:
CAS Developers
Report Type:
Suggestion / Enhancement Request
Date Reported:
10/27/2005 7:14:53 AM
Severity:
Infrequently encountered problem
Last Updated:
10/29/2005 6:41:03 AM
Platform:
All versions
Internal Tracking #:
Resolution:
Need More Info
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
(1 Total Rating)
1.00 out of 5
Total Votes:
None
Description
The $region directive can be so useful sometimes, but you have no control over it, asside from where it starts and ends.
Take a large cumbersome disclaimer in a comment block for example. You may not delete it, but needing to scroll past it for three screenfuls everytime you work in the unit is a serious pain in the you-know-what. Wrapping them in a $region-$endregion pair allows you to hide the disclaimer/notice/description so it doesn't get in the way, but there is no way to hide it by default when the file is opened.
Now I know that some people may find hiding disclaimers disturbing in some sense, but that is one example. How about a collection of functions that take up lots of screen real estate, is used often, changes never but introduces lots of clutter.
I would think that working out a system of parameters to this directive would yield many more possibilities, like folding a specific block with another.
I suppose an alternative solution will be to automatically keep track of large comment blocks as you do procedure blocks. Say, blocks of more than five lines become foldable by default. And perhaps the Folding menu lists comment blocks so you can show/hide them file-wide with a single click. This offers less functionality but will be very useful already - perhaps it can even be used in conjunction with the parameters.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments
CAS Developers at 10/31/2005 11:20:11 PM
-
More info? The idea was to let you guys take the ball and run with it (mere musings on my part).
I can think of a number of ways to do this:
1. If the editor saved your options on the Fold menu item, that would solve part of it - I think there is another QC report for that already.
2. The editor could keep track of comment blocks larger than, say, five lines, in the same way as it tracks begin-end pairs of procedures. That way, I could fold a large comment block by simply clicking the minus, or by going to the editors' Fold menu and selecting "Comment blocks"
3. The $region directive could be enanced to allow more than a description. So I could mark a block in this way:
{$region 'A whole lot of mundane stuff' default=folded}
// All my mundane stuff go here
{$endregion}
Or something thereabouts.
Is this the info you asked for?
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us