Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mo 21.03.11 20:31 
Wie kann ich in Delphi XE einstellen, dass ich zwar einen Zeilenumbruch nach nem Semikolon aber nicht nach einem end haben möchte?
Es geht um die automatische Formatierung
Ich will sowas hier:
ausblenden Delphi-Quelltext
1:
2:
3:
if (foo=bar) then begin
  fooo()
end else baar();

er macht aber:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if (foo=bar) then begin
  fooo()
end
else if(go) then baar();


bzw.
ausblenden Delphi-Quelltext
1:
2:
3:
if (foo=bar) then begin
  fooo()
end else baar();

er macht aber:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if (foo=bar) then begin
  fooo()
end
else if(go) then baar();
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 21.03.11 21:37 
Was ich davon halte die Übersichtlichkeit künstlich zu reduzieren, führe ich wohl besser nicht näher aus... :roll:

Die Option, die du suchst, ist "Zeilenumbrüche in 'End Else Begin' entfernen" (unter Zeilenumbrüche natürlich).
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mo 21.03.11 22:10 
Jeder wie er es für übersichtlicher hällt ;)

die option entfernt die aber nur für "end else begin" nicht für "end else ..." oder "end else if" was ich aber gern hätte
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Di 22.03.11 21:25 
Gibts nicht?

Weitere Frage dazu: Der formatiert die propertys so, dass er nach den spitzen Klammern von Generics kein Leerzeichen vor read setzt.
also:
ausblenden Delphi-Quelltext
1:
property Foo:TFoo<TBar>read FFoo					

Ergebnis: Nicht schön lesbar und anklicken um zur Deklaration zu springen funzt auch nicht.
Kann man das ändern?