1 Reply Latest reply on Jun 26, 2019 5:43 PM by Vadim Tropashko-Oracle

    Custom formatting the Procedure parameters and list of Values

    user637346

      Hi,

       

      My current SQL Developer formatting formats functions/procedures arguments like the following

       

      fnd_file.put_line(

              fnd_file.LOG,

              'output message'

      );

       

      Could you help me to format like below:

       

      fnd_file.put_line(fnd_file.LOG,

                                'output message');

      Also, my list of IN values should be in same line unless it is max line size. If it exceeds max line size, then break a line for each value. Parenthesis should start and end as above mentioned.

       

      I have attached my custom .arbori file.

        • 1. Re: Custom formatting the Procedure parameters and list of Values
          Vadim Tropashko-Oracle

          As you have mentioned in the other thread, you want to align both procedure calls and declarations. The 18.4 amendment for removing indent in declarations is the same:

           

          simpleIndentConditions:

          ...

          | [node) privilege_audit_clause

          --| [node) parm_list_opt &  [node^) fml_part

          --| [node) prm_spec &      [node^) fml_part

          | [node) query_partition_clause --& [node^) analytic_clause

          ...

           

          Remove indentation of procedure arguments in similar fashion:

           

          ...

          | [node) alter_method_spec

          --| :breaksProcArgs & [node) arg & [node^) paren_expr_list & [node+1) arg_list

          --| :breaksProcArgs & [node) arg_list & [node^) paren_expr_list & [node-1) arg

          --| :breaksProcArgs & [node) ',' & [node^) arg_list & [node+1) arg

          ...

           

          Now, arguments in the declaration are aligned, but those in the call are not. Therefore:

           

          pairwiseAlignments9:

            [predecessor) arg

          & [node) arg

          & predecessor)+1=[node

          ;

           

           

          format.png

          I have enclosed the amended format program.