Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Enhancement Request for SQLDev: Don't format code with parse errors

The formatter in SQLDev formats the code even if errors are found. The result is sometimes ok and in other cases it is fatal. Granted, you can always press Ctrl-Z to undo the formatting. But to do that, you have to recognize that something has gone wrong. With larger files, you may not see it right away. Undoing the formatting result may not be as easy later.
A case of fatal formatting result is documented here: https://github.com/Trivadis/plsql-formatter-settings/issues/98 (reproducible with default formatter settings).
Why not provide an additional option? Something like "Format code on error? (Yes/No)". You can keep the current default of "Yes".
There are for sure some developers (like me) who would like to change the default to "No".

This post has been answered by Vadim Tropashko-Oracle on Mar 12 2021
Jump to Answer

Comments

Vadim Tropashko-Oracle
Answer

I understand that as soon as such option becomes avaliable, you'll set it to a certain value in the Trivadis custom preferences file. Then, it doesn't have to appear as a dedicated checkbox on the sqldev format options page, but you still can manually edit it in the preferences.xml.
SqlDev can certainly have such a checkbox, but I would prefer to have the options panel to be less cluterred. To the other readers of the thread: if you absolutely want such a checkbox, then please vote (=like) in favor of Philipp's proposal. If you are fine with the formatter as it is, or don't mind editing preferences.xml, or simply don't care, then please vote here.

Marked as Answer by Philipp Salvisberg · Mar 12 2021
Philipp Salvisberg

An additional option in the XML preferences is good enough for me. I do not need a checkbox in the UI.

1 - 2

Post Details

Added on Mar 12 2021
2 comments
190 views