Alan Colburn wrote:
> Hi all --
>
> I thought it could be useful to all of us to get a thread
> going where we share IDE features (or even configurations)
> that we've found to boost our productivity. You might become
> more efficient or happy because of a feature you didn't know
> was there--and you might be able to help others do the same :-)
>
> In that spirit, I'll try to start ...
>
> Code folding is a feature in D2005 that I find useful.
> However, the IDE also lets you define your own custom regions that
> can be folded and unfolded. If you've got a group of procedures, for
> example, that are similar and logically grouped together, you can
> fold and unfold the entire group as one.
>
> At the beginning of the new region enter
> {$REGION 'Name of Region'}
>
> followed by
> {$ENDREGION}
> at the region's endpoint.
>
> What makes you more productive?
One of my personal favorites is the "Complete Class at Cursor"
(Ctrl+Shift+C) function.
This function is context sensitive: If you're in the
implementation section of a class, it adds any method headers
you've added to the class declaration.
If you're in the class declaration, it will create skeleton
method bodies in the implementation section. But more importantly
(from my perspective) if you create a new property like so:
type
Myclass = class
published
property MyProp : aType
read FMyProp write SetMyProp;
end;
And invoke the "Complete Class at Cursor" function, the IDE will
add the Member variable, the setter method header, and the setter
method body:
type
Myclass = class
private
FMyProp: aType;
procedure SetMyProp(const Value: aType);
published
property MyProp : aType
read FMyProp write SetMyProp;
end;
...
implementation
procedure Myclass.SetMyProp(const Value: aType);
begin
FMyProp := Value;
end;
This action is smart enough to recognize whether the read and
write refer to a Member variable or to getter and/or setter
methods, or whether it's a read-only property; and behaves
accordingly. It even handles array properties.
That's some mighty handy code generation when you're deep in
class creation.
One caveat: if you add method bodies to the implementation
section manually, it's worth the effort to keep them in
alphabetical order.
If you don't it confuses the automatic code generation, and the
IDE will simply start appending automatically generated methods
at the end of the unit rather than contiguously with the class's
other methods.
HTH
Stephen Posey
[EMAIL PROTECTED]
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi