Toad World® Forums

Formatter changes full line comments to trailing comments

All,

when I comment out some code (e.g. using Ctrl-B) in them iddle of a query then the formatter will move the first commented line after the preceding not-commented line.
If that line already has a trailing comment, the line comments will be aligned with that comment.

This results in commented code being moved quite far to the right. But I don't need the commented out code to be moved to the right.
The fact that this piece of code is shown in green is enough to warn me that the code is currently inactive.

Could we please have an option in the comments section to prevent this type of behaviour?

E.g.: align embedded line-comments to the left, to the right, adjacent to preceding code line, or leave in place?

See examples below: the first one shows how I formatted my code, the second one is what the formatter does with it.

Toad_formatter_embedded_line_comment_1.png

Abe Kornelis

Additional info: the examples above were taken from a package body definition. When I copy the query into a separate window. I get different results:

Is there a reason why the line comments are now aligned with the left margin?

Even though I like this format better, it looks like inconsistent behaviour to me.

Abe.

I can reproduce the behavior in your first post for both procedural and standalone queries. I only get the the behavior of post #2 whenever the comments follow the entire query (regardless the position of the terminator).

Anyway, all this is not intentional and I’ll fix it asap (QP-1052).

Thanks for reporting,

Andre