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!

SQLDev 20.4.1 Formatter issues after multi-line comment. Bug?

I use the default formatter settings in SQLDev plus "Line Breaks On Comma: Before":
image.pngWhen I format the following code

select A,
       B /* multi line comment*/, 
       C
  from T;

The result looks like this:

SELECT
    a
  , b /* multi line comment*/, c
FROM
    t;

Based on my analysis it looks like it is not possible to control the whitespaces before a node following a multi-line comment, if no newline is defined for that node (comma in this example).
The only workaround I see is to add some pre-processing to add the newlines after the multi-line comments, re-parse and then format the code.
Thoughts?

This post has been answered by Vadim Tropashko-Oracle on Mar 29 2021
Jump to Answer
Comments
Post Details
Added on Mar 29 2021
1 comment
246 views