A spinoff from previous idea:
A tool to order method bodies in implementation according to interface order.
Example:
type
TMyClass = class
private
FText: String;
procedure SetText(Value: String);
public
constructor Create(AText: String);
procedure Show(Canvas: TCanvas);
function GetSize(Canvas: TCanvas): TPoint; virtual;
procedure Whatever; virtual; abstract;
property Text: String read FText write SetText;
end;
TMyClass2 = class(TMyClass)
public
procedure Whatever; override;
end;
implementation
constructor TMyClass.Create(AText: String);
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
procedure TMyClass.SetText(Value: String);
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
procedure TMyClass2.Whatever;
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
function TMyClass.GetSize(Canvas: TCanvas): TPoint;
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
procedure TMyClass.Show(Canvas: TCanvas);
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
After running the wizard, the implementation would look like this:
procedure TMyClass.SetText(Value: String);
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
constructor TMyClass.Create(AText: String);
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
procedure TMyClass.Show(Canvas: TCanvas);
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
function TMyClass.GetSize(Canvas: TCanvas): TPoint;
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
procedure TMyClass2.Whatever;
begin
{$MESSAGE WARN 'Not implemented yet!'}
end;
--
BR,
Lauri -- the idea generator