You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Add missing parameters to ABAP Doc #24
that's a great idea, thanks! We could also use the opportunity to ensure that the order of parameters still matches the declaration – so if someone modifies the signature, Ctrl+4 would automatically adjust the ABAP Doc section accordingly.
meanwhile, the cleanup rule is implemented, however, there is one issue: Imagine you have a method like this:
"! <p class="shorttext synchronized">any method documentation</p>"!"! @parameter iv_any_param | <p class="shorttext synchronized">any param documentation</p>METHODS any_method
IMPORTING iv_any_param TYPE i.
Now your colleague uses SAP GUI to add a new parameter iv_new_param to the method, and also diligently adds a description "new param documentation" for it in SAP GUI.
When you open the code in ADT again, it will look like this:
"! <p class="shorttext synchronized">any method documentation</p>"!"! @parameter iv_any_param | <p class="shorttext synchronized">any param documentation</p>METHODS any_method
IMPORTING
iv_any_param TYPE i
iv_new_param TYPE i.
So, the new parameter is of course visible, but its description is NOT added to the ABAP Doc in ADT.
Now you run the new cleanup rule, which adds a documentation line for the new parameter with an empty description, using the same style (<p class="shorttext synchronized">) as the other ABAP Doc …
"! <p class="shorttext synchronized">any method documentation</p>"!"! @parameter iv_any_param | <p class="shorttext synchronized">any param documentation</p>"! @parameter iv_new_param | <p class="shorttext synchronized"></p>METHODS any_method
IMPORTING
iv_any_param TYPE i
iv_new_param TYPE i.
… and your colleague's description is synchronized away :-(, because it is overwritten with the empty description.
So, in such a case (part of the team using SAP GUI for development), we'd actually need backend access to find out whether a description for a missing ABAP Doc line was maintained in SAP GUI.
My workaround would be options like this:
with the following selection for the "Add missing …" settings:
and a warning for the "Always" option:
If your whole team uses ADT, or if you don't synchronize ABAP Doc anyway, then you'd of course be safe to use "Always".
Activity
jmgrassau commentedon May 25, 2023
Hi ConjuringCoffee (really like that nickname :-)
that's a great idea, thanks! We could also use the opportunity to ensure that the order of parameters still matches the declaration – so if someone modifies the signature, Ctrl+4 would automatically adjust the ABAP Doc section accordingly.
Kind regards,
Jörg-Michael
jmgrassau commentedon Jun 5, 2023
Hi ConjuringCoffee,
meanwhile, the cleanup rule is implemented, however, there is one issue: Imagine you have a method like this:
Now your colleague uses SAP GUI to add a new parameter
iv_new_paramto the method, and also diligently adds a description "new param documentation" for it in SAP GUI.When you open the code in ADT again, it will look like this:
So, the new parameter is of course visible, but its description is NOT added to the ABAP Doc in ADT.
Now you run the new cleanup rule, which adds a documentation line for the new parameter with an empty description, using the same style (
<p class="shorttext synchronized">) as the other ABAP Doc …… and your colleague's description is synchronized away :-(, because it is overwritten with the empty description.
So, in such a case (part of the team using SAP GUI for development), we'd actually need backend access to find out whether a description for a missing ABAP Doc line was maintained in SAP GUI.
My workaround would be options like this:
with the following selection for the "Add missing …" settings:
and a warning for the "Always" option:
If your whole team uses ADT, or if you don't synchronize ABAP Doc anyway, then you'd of course be safe to use "Always".
Kind regards,
Jörg-Michael
jmgrassau commentedon Jun 5, 2023
P.S.: Apart from that, things work quite nicely:
add new rule 'Add missing parameters to ABAP Doc' (SAP#24)
add new rule 'Add missing parameters to ABAP Doc' (#24)
jmgrassau commentedon Jun 6, 2023
Hi ConjuringCoffee,
this new cleanup rule is now freshly released with version 1.3.0!
Kind regards,
Jörg-Michael