JavaDoc comment on extracted method.

5 views
Skip to first unread message

Jaroslaw Kołodziejczyk

unread,
Jul 17, 2023, 5:21:56 PM7/17/23
to Illuminated Cloud General Discussion
Hi,

Would it be possible to add a feature which would extract method name, params etc. and create an JavaDoc comment along with the extracted method? Even better if we would be able to format this comment and add an author for example.
Intellij built-in JavaDoc comment feature is pretty lackluster in terms of customizability.
I understand that this is in no way critical, just an idea for future iterations.

Regards,
Jarosław Kołodziejczyk

Scott Wells

unread,
Jul 17, 2023, 5:34:25 PM7/17/23
to Illuminated Cloud General Discussion, Jaroslaw Kołodziejczyk
While not exactly what you're requesting, immediately upon extracting the method, you can use Alt/Opt+Enter > Add ApexDoc comment to generate an ApexDoc comment for the extracted method that takes into account its parameters and return type, e.g.:

Add_ApexDoc_Comment.png

which generates:

Added_ApexDoc_Comment.png

If you'd like to see something like Generate ApexDoc comment as an option in the Extract Method dialog, please log an enhancement request in the public issue tracker which will ensure that it is more concretely on the list of candidates.

Regards,
Scott Wells
Reply all
Reply to author
Forward
0 new messages