with Oracle SQL Developer 3.2.20.09 with included JDK on Windows 7 32 bit, we loaded a sql file containing a query with some comments (beginning with -- or /*).
We formatted the sql code with the automatic format tool without any problem.
But when we added or modified some criteria in the Query Builder, after saving the file the comments lines in the Worksheet are gone.
Thanks for reading and best regards.
Marco - Italy
Please note that SQL Developer has included a Query Builder from a third-party since the 3.0 release. I will ping the developer that acts as liaison; perhaps you will get a more definitive response. Until then, you may consider the response to one bug I logged concerning some complex SQL the Query Builder's parser did not properly handle: Query Builder is a visual environment targeted at novice/intermediate users. There are a number of advanced and/or hard to visualize language features that are not supported.*
Perhaps the use case of opening an external SQL file (potentially large / complex / with comments) may go beyond the intended usage of interactive development for the novice/intermediate user.
SQL Developer Team