Removed in the “Starter” edition of Delphi XE2, code formatting is easily reinstituted with at least two 3rd party tools that I’m aware of. The first, my personal preference and the only one I plan to cover [others may get suggested in the comments section] is “GExperts Experimental by TWM”. One specific reason I much prefer this particular rendition of a code formatter is that to get it you need to install GExperts and, it is my opinion, you really should have GExperts installed and available in any Delphi IDE.
GExperts Experimental by TWM ... “These versions are always based on the current SubVersion/CVS repository code of the GExperts project. In addition to the normal functionality they include the code formatter formerly known as DelForEx. The code has kindly been donated by Egbert van Nes.”.
It is pretty easy to install and get running but you need to read and follow the instructions.
To get it all installed and running ...
- download and install the release of GExperts for XE2 ,
- download the appropriate GExperts Experimental by TWM archive file - I prefer to save it into the GExperts installation folder,
- extract the file “preview.pas” and all the “.ini files” from the TWM archive file to the GExperts installation directory,
- depending on if you choose either the Editor Expert or the Regular Expert copy the “GExpertsRSXE2.dll” from the corresponding folder in the TWM archive file to the GExperts installation directory replacing the existing GExpertsRSXE2.dll file.
Now, with the exception of code formatting [and any of the other GExperts tools that you understand how to use and happen to need], go into the GExperts Configuration settings and turn them all off. Figure out how code formatting works and we’ve accomplished what we set out to do. I have not compared the one that comes out of the box to the one detailed above but it is quite possible that the one you now have could be a bit better in one aspect or another than what you would have had Embarcadero left it alone. Later and as needs arise, study and understand how each of the additional GExperts tools work, decide if you need to leave them “live” and slowly work up to having the tools fully configured and operating the way that works best for you.
Thanks for stopping by