如何防止代碼格式化程序這樣做?看起來它移動與「一樣」總是排隊。這是一個錯誤,還是格式化程序中有任何設置?Delphi 2010 Code Formatter:「(MyVar as TMyType).MyMethod」分成兩行
// 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;
這樣會很奇怪:
// 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;
出現了一個bug給我...... – 2010-05-07 09:30:47