Beautifier Altering Strings

In some of our larger packages, functions and procedures, the code beautifier has altered some strings by changing their case and putting a space at the start of them.

For instance sometime it is to lowercase like 'T' becomes ' t', and at others it is to tile case 'MEC000' becoming ' Mec000'.

If I was to hazard a guess, it looks like pl/sql developer is loosing track of what is a string, and treating them as a keyword or identifier.

We have large amounts of SQL and the changes have been pervasive, and difficult to locate and restore.

We have stopped all our programmers using Code Beautifier until this has been resolved. We have a 10 user licence, and our Version is 6.0.4.906
 
I was experimenting to get a reliable example, and I discover that it only occurs when there is a SQL syntax error. If a string has not been terminated, then everything after it is miss-interpreted. Strings are formatted as Non-Strings and Non-Strings as Strings.

As a string cannot go over a single line, the Beautifier should realize that if it gets to a line break, something has gone wrong.

This seems like a bug in the Beautifier, as it should be able to handle this.

Chris
 
This can indeed explain the problem. A string can go over a single line though, and the PL/SQL parser of the beautifier is not as strict as Oracle's PL/SQL compiler, so this can happen. Note however that the latest PL/SQL Developer version will highlight multi-line strings correctly, so the chance that you forget to terminate a string is zero in that case.
 
Back
Top