beautifier enhancements ... really easy ones ...

rbrooker

Member³
Hi Marco,

There is one thing that would make me very happy if you could implement. shouldn't be too hard, it's pretty minor.

Code:
BEGIN
    dbms_audit_mgmt.clean_audit_trail(audit_trail_type => dbms_audit_mgmt.audit_trail_all
                                     ,use_last_arch_timestamp => FALSE);
EXCEPTION
    WHEN OTHERS THEN
        NULL;
END;
/

when you use the beautifier, are you able to indent the parameters one tabstop (or nn spaces) on the line below instead of aligning them to where they fall on the line above?

Code:
BEGIN
    dbms_audit_mgmt.clean_audit_trail(
        audit_trail_type => dbms_audit_mgmt.audit_trail_all
       ,use_last_arch_timestamp => FALSE);
EXCEPTION
    WHEN OTHERS THEN
        NULL;
END;
/

This would also make sense when you are declaring a procedure/ function with a single parameter and you have parameter format set to one parameter per line

Code:
PROCEDURE foo(bar IN VARCHAR2) IS
BEGIN
    dbms_output.put_line('Foo says ' || bar);
END;
/

should be

Code:
PROCEDURE foo
(
    bar IN VARCHAR2
) IS
BEGIN
    dbms_output.put_line('Foo says ' || bar);
END;
/

Thoughts?
 
We'd like changes to the beautifier as well and would like block notation and the option of a space after '(' and ',':

Code:
procedure do_foo -- do some really foofoo stuf...
( p_bar varchar2 -- bar parameter description {foo|bar}
, p_ba2 number   -- ba2 parameter description [0-9]
, ...
) is
begin...

What I consider very neat is that when we point to a call to this procedure in code we get a neat box displaying the declaration including comments...

and named notation format when using this procedure:

Code:
do_foo
  ( p_bar => 'foo'
  , p_ba2 => l_ba2
  , ...
  );

btw, if we enter the '(' immediately after the procedure call we get a nice list starting with 'all', followed by the procedure parameters and after selecting 1 resulting in named notation. When first pressing enter and then '(' this list does not appear. We could consider this designed behaviour, because when only 1, 2 or 3 parameters are used one line should fit:

Code:
do_foo( p_bar => 'bar', p_ba2 => l_ba2 );

One might suggest that in case of do_foo - enter - '(' developer probably wants all parameters...

Thanks in advance.
 
Agree - I always use a format similar to this. I think a space after a leading (bullet-style) comma is pretty standard, and every other formatter out there provides it. In fact, the Beautifier already adds the space after commas when items are in a single line, so it's always a bit frustrating that it then loses it in a multi-line layout.
 
Back
Top