How to prevent the code formatter from doing this? It seems that it moves casts with "as" always a line up. Is this a bug, or is there any setting in the formatter?
// Before formatting:
procedure TMyFrame.WidthEditChange(Sender: TObject);
begin
(Properties as TMyProperties).Width := (Sender as TJvSpinEdit).AsInteger;
end;
// After formatting:
procedure TMyFrame.WidthEditChange(Sender: TObject);
begin (Properties as TMyProperties) // <----- I want this untouched
.Width := (Sender as TJvSpinEdit).AsInteger;
end;
It gets weird:
// Before formatting:
procedure TMyFrame.WidthEditChange(Sender: TObject);
begin
(Properties as TMyProperties).Width := (Sender as TJvSpinEdit).AsInteger;
(Properties as TMyProperties).MyMethod;
end;
// After formatting:
procedure TMyFrame.WidthEditChange(Sender: TObject);
begin (Properties as TMyProperties)
.Width := (Sender as TJvSpinEdit).AsInteger; (Properties as TMyProperties)
.MyMethod;
end;