Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi code formatter

Are there any utilities that reformat Delphi code ?

EDIT

I am using Delphi 2006

Some feedback

Thanks to all that answered this question

I have been using the JCF code formatter - it works well and my code is been formated to Object Pascal Style Guide

like image 948
Charles Faiga Avatar asked Dec 31 '08 11:12

Charles Faiga


4 Answers

You can try the "Jedi code Format". See more information here: http://jedicodeformat.sourceforge.net/

The formatting engine of DelForExp has been integrated into the code base of GExperts. An experimental version of GExperts including a "Code formatter" here:
http://blog.dummzeuch.de/experimental-gexperts-version/

Separate information/downloads for DelForExp here.

Regards.

like image 177
Germán Estévez -Neftalí- Avatar answered Nov 19 '22 13:11

Germán Estévez -Neftalí-


I have been for some time releasing experimental GExperts versions that include the code formatter formerly known as DelForEx with some improvements and fixes. The latest release is from 2020-10-23 and supports the following Delphi versions:

  • Delphi 6 to 7
  • Delphi 2005 to 2010
  • Delphi XE
  • Delphi XE2 to XE8
  • Delphi 10 to 10.4
  • Delphi 11 (Danger, Alpha version for now 2021-10-24)

Please note, though, that I am using it only with Delphi 2007, so the other versions may have unknown bugs. Also, not all language improvements of later Delphi versions will work, e.g. nested types, generics and anonymous methods.

see gexperts.dummzeuch.de for details.

btw: Any help improving the formatter, especially adding the new language constructs would be appreciated. The source code can be downloaded from the subversion repository linked from my homepage.

like image 23
dummzeuch Avatar answered Nov 19 '22 13:11

dummzeuch


I found this: JEDI Code Format

like image 5
PEZ Avatar answered Nov 19 '22 13:11

PEZ


lextudio - Code Beautifier Collection 6 for CodeGear RAD Studio 2007

http://code.google.com/p/lextudio/

like image 4
RRUZ Avatar answered Nov 19 '22 13:11

RRUZ