2014 Nov 19 6:34 PM
Hi all,
I'm currently trying out ABAP Doc. In a Java editor, you can press Alt+Shift+J to have a Javadoc comment generated for a method, a class, or any other member using a template. Without thinking, I tried that in the ABAP Editor, and it didn't work. Alt+Shift+A doesn't work either - or rather, it switches to the block selection mode (which is extremely helpful as well). Are there plans to integrate a Javadoc-generator-like function to the ADT as well?
Thanks
Volker
2014 Nov 20 6:56 AM
Hi Volker,
this feature is already in development. Highly requested by lots of AIE users.
We want to provide two flavors:
a.) online variant via http access: That means you can request the documentation online directly from the ABAP server via HTTP.
b.) possiblity to create offline HTML pages out of the ABAP Doc content.
For sure both with navigation capabilities within the ABAP Doc.
Kind Regards,
Thomas.
2014 Nov 20 7:20 AM
Hi Thomas,
I'm not sure we're talking about the same thing. I didn't mean to adress the HTML generation. If I'm in the JDT Java editor, place the cursor on a method and press Alt+Shift+J, the editor inserts a JAvadoc template into the code that I can then fill out. I'd like to have a similar function for ABAP: Place cursor on a method, press Alt+Shift+Something and have an ABAP Doc comment block generated inserted for me that I can then fill with contents.
Best regards
Volker
2014 Nov 20 7:50 AM
<sarcasm>Ahh, you mean the code editor option "insert standard comment"?</sarcasm>
2014 Nov 20 8:29 AM
Hi Volker,
you can generate a basic ABAP Doc comment via ctrl+1
1) Start ABAP Doc statement in front of method
"!<position cursor here>
methods m1.
2) Press ctrl+1
3) Pick option "Add missing parameters to documentation"
Does this fulfil your requirement?
cheers
Thomas
2014 Nov 20 9:00 AM
Hi Volker,
you can create your own code templates. Go to the menubar: Windows | Preferences and in the pop up go to ABAP Development | Editors | Source Code Editor | Templates. There you can define an own template for the ABAP Doc you want.
Cheers,
Martin
2014 Nov 20 9:15 AM
Martin,
you're of course right, but those templates are limited with respect to dynamic parts.
If you want the ABAP-Doc to be generated e. g. describing the signature-parameters of a method, Ctrl+1 seems to be appropriate. Or is there any way to make those templates more dynamic?
Cheers,
Oliver
2014 Nov 20 10:35 AM
Hi Thomas,
it's a workaround with the drawback that you can't preset a default template for the generated code. If I want to do that, I need to define a template for that and then
That's a lot more keystrokes. It works, but there's room for improvement 🙂
Cheers
Volker
2014 Nov 20 11:20 AM
For existing classes/interfaces (which are documented by using shorttext descriptions), you might want to try the menu entry "Source > Import ABAP Doc from Descriptions" in class/interface editor. This might be also an option for an initial set of ABAP Doc comments in a class.
Michael