View Issue Details

IDProjectCategoryView StatusLast Update
0009599LazarusIDEpublic2013-09-03 12:08
ReporterGraeme GeldenhuysAssigned ToMattias Gaertner 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
Platformx86OSUbuntu LinuxOS Version7.04
Product Version0.9.23 (SVN)Product Buildr11831 
Target VersionFixed in Version 
Summary0009599: Incorrect formatting of setter method after using class completion
DescriptionCodeTools doesn't adhere to the formatting rules I specified when I do class completion of a property that has a Setter method.

 Example:
   TMyClass = class(TObject)
   ...
   public
     property Name: string read FName write SetName;
   end;

I then press Ctrl+Shift+C

The resulting SetName method looks like this:

--------------------------------------------
procedure TMainForm.SetName(const AValue: string);
begin
  if FName=AValue then exit;
  FName:=AValue;
end;
--------------------------------------------

In CodeTools I specified spaces between identifiers and the equals (=) sign. Also spaces before and after 'is equals' (:=) which CodeTools didn't insert.

Every time I have to manually fix the formatting to this:
--------------------------------------------
procedure TMainForm.SetName(const AValue: string);
begin
  if FName = AValue then
    exit;
  FName := AValue;
end;
--------------------------------------------

TagsNo tags attached.
Fixed in Revision
LazTarget1.4
WidgetsetGTK, Win32/Win64
Attached Files

Activities

Mattias Gaertner

2007-09-20 15:09

manager   ~0014799

This works here. Set insert space in front of identifier

If you are using the GTK2 interface: Remember that the TCheckGroup has the bug, that the checks are not set correctly.
Just open the codetools options dialog again and see if you really set the options correct.

BTW, := is not the 'is equal', but the assignment operator.

Vincent Snijders

2007-10-26 13:33

manager   ~0015764

No feedback from reporter

Issue History

Date Modified Username Field Change
2007-09-04 15:11 Graeme Geldenhuys New Issue
2007-09-04 15:11 Graeme Geldenhuys Widgetset => GTK, Win32
2007-09-19 13:11 Vincent Snijders LazTarget => post 1.2
2007-09-19 13:11 Vincent Snijders Status new => acknowledged
2007-09-20 15:09 Mattias Gaertner Note Added: 0014799
2007-09-20 15:09 Mattias Gaertner Assigned To => Mattias Gaertner
2007-09-20 15:09 Mattias Gaertner Status acknowledged => feedback
2007-09-20 15:09 Mattias Gaertner Resolution open => unable to reproduce
2007-10-26 13:33 Vincent Snijders Status feedback => resolved
2007-10-26 13:33 Vincent Snijders Note Added: 0015764
2008-03-25 00:58 Marc Weustink Status resolved => closed
2013-09-03 12:08 Martin Friebe LazTarget post 1.2 => 1.4