[Lazarus] Class completion incorrectly written for interfaces
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Apr 17 10:32:18 CEST 2008
On Thu, 17 Apr 2008 08:47:28 +0200
Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> Mattias Gärtner wrote:
> > Zitat von Graeme Geldenhuys <graemeg.lists at gmail.com>:
> >
> >> Submitted to mantis as:
> >> http://bugs.freepascal.org/view.php?id=11158
> >
> > Fixed in svn 14850.
> > At the moment the bug tracker is not responding, so I can't update
> > it.
> >
>
> Thanks Mattias. It places the code correctly behind the GUID, but the
> indentation is now wrong. I looked in the SVN logs to see what you
> changed, and to try and create a patch myself. But I'm afraid the
> code completion unit is the most cryptic I have seen - so I have no
> clue as to what needs to change. ;-)
>
> Here is an example of the output now:
>
> ITest = interface(IInterface)
> ['{F5FF79F8-F29F-4861-A5D3-2905C86AE235}']
> function GetAge: integer;
> function GetName: string;
> procedure setName(const AValue: string);
> property Name: string read GetName write setName;
> property Age: integer read GetAge;
> end;
>
>
> And how it should have looked:
>
> ITest = interface(IInterface)
> ['{F5FF79F8-F29F-4861-A5D3-2905C86AE235}']
> function GetAge: integer;
> function GetName: string;
> procedure setName(const AValue: string);
> property Name: string read GetName write setName;
> property Age: integer read GetAge;
> end;
The codetools have only a rudimentary code formatter that assumes that
the GUID is indented like many interfaces in the RTL. A
real code formatter is planned.
Maybe a minimum indentation relative to the class/interface node can be
added.
Mattias
More information about the Lazarus
mailing list