Automating the beautifier?

Atl_Chris

Member²
I was wondering if anyone has any sample code for automating the beautifier? I'm interested because we have about 700 files on the file system that need to be beautified. I'm not really interested in doing this manually. :)
It appears that pl/sql developer supports some command line operations and thus the reason for my question. Any code snippets or general direction on how to do this are greatly appreciated.
Thank you for any assistance you can provide!
Chris
 
In the Command Window you can use the BEAUTIFY command for batch scrip processing. For example:

SQL> beautify c:\scripts\employee.spc
SQL> beautify c:\scripts\employee.bdy

Note that the source file is modified. Wildcards are not supported.

All you need to do is create a script that performs this action for all files. The easiest way to do this for 700 files is to capture the output of a DIR command, and converting each line with a macro to the syntax mentioned above.
 
Notice that there is a bug in the command line beautifier. It only works for the first program unit in the file. If you have the specification and the body in the same file the command line beautifier doesn't work. This bug makes the command beautifier useless.
 
Back
Top