Another great feature of UltraEdit is the ability to configure tools, programs, or commands that can be run from the menu or toolbar.
So here is how to configure the open source tool AStyle (Artistic Style) so that C/C++ or Java code looks like this:

.. will be “beautified” in just about any format style, like this:

Download AStyle and save it where you want it. There is no install to run.
In UltraEdit, go into Advanced > Tool Configuration from the menu.
Configure the command to run the AStyle program passing it the style option(s) you want. Run AStyle.exe -h from a command prompt to see all the options.
In this example, we are using the following Command Line
“C:\Program Files\AStyleWin\AStyle.exe” –style=allman –quiet “%f”



Save your configuration (Apply and/or OK) and you will have AStyle available as a menu item for you to use.

When you select this tool from the menu (or use the short cut keys) AStyle will run against the current open file. To see the results of the beautification, make sure to choose Yes to reload when prompted.

References
- Artistic Style Source Code Beautifier command line version (AStyle)
http://sourceforge.net/projects/astyle - Artistic Style Source Code Beautifier for Windows (AStyleWin)
http://www.geocities.com/jpattee/astylewin/Downloads.html - AStyleWin Icon file
AStyleWin.ico - UltraEdit
http://www.ultraedit.com/
