After installing the latest version of UltraEdit and configuring it, I discovered that the Artistic Style source code formatter is built in and easily added.
From the Advanced > Configuration menu option

Choose Toolbars / Menus > Customization and then select the Customize Toolbar button.

Scroll down on the left side until you find the Artistic Style toolbar item, then select it and click on left arrow to add it to the toolbar, and select OK.

The end result is a built in toolbar button for AStyle..

…which presents the formatting options dialog whenever you click on it.

Much easier than my original post!
Tags: tip, UltraEdit
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
Tags: UltraEdit