The end of most beautifier enhancement requests request

aotte

Member³
Hi,

I still feel that the beautifier doesn't format it exactly the way I like it. Judging by the number beautifier enhancement requests I'm seeing, I'm not the only one. So I thought I would put in a request that might solve most of them in one go. It's a biggie though. :)

I think it roughly comes down to how we want to order key words, identifiers, modifiers, separators, indents and other white space.

So what if the good people at AllroundAutomations provide us with a syntax that allows us to define our own rules?

E.g. I like to see my select statements using a very consistent closed block-like indenting like this (2 space indent size):

Code:
SELECT
  column1
  ,column2
FROM
  table1  t1
  ,table2 t2
WHERE
  t1.column3     = t2.column3
  AND t1.column4 = t2.column5
;
I would envision a configuration file that would hold something like this:

Code:
{keep_original_indent}
[SELECT]{cr}
{identifier_list}
{indent}{first_identifier}{indent_aligned}{alias}{cr}
{indent}{separator}{repeat_identifier}{indent_aligned}{alias}{cr}
{indent}{separator}{last_identifier}{indent_aligned}{alias}{cr}
{/identifier_list}
[FROM]{cr}
{identifier_list}
{indent}{first_identifier}{cr}
{indent}{separator}{repeat_identifier}{cr}
{indent}{separator}{last_identifier}{cr}{/identifier_list}
[WHERE]
{expression_list}
{indent}{first_expression}{cr}
{indent}{logical_operator}{repeat_expression}{cr}
{indent}{logical_operator}{last_expression}{cr}{/expression_list}
{/keep_original_indent}
[;]
Now, this example is something I put together in just 2 minutes, so I know there are tons of things wrong with this example, but it is the idea of having a syntax available to us that I'm looking for.

The syntax would give us more felixibility than any user interface can give us. It would also allow us to add formatting logic for our own keywords, or new Oracle features that are not yet supported out of the box. Hey, we can even add DDL to be dealt with by the beautifier. Or even have it beautify PERL, ksh, Java, and whatever else we feel like.

Just an idea....

I set up a poll to give Marco and the guys an idea on how much we want, like, not care about this idea as a new feature.

Beautifier Rules Syntax Feature Poll
 
Back
Top