Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Doc generation

Former Member
0 Likes
1,474

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

8 REPLIES 8
Read only

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,300

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.

Read only

Former Member
0 Likes
1,300

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

Read only

Former Member
0 Likes
1,300

<sarcasm>Ahh, you mean the code editor option "insert standard comment"?</sarcasm>

Read only

0 Likes
1,300

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

Read only

0 Likes
1,300

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

Read only

Former Member
0 Likes
1,300

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

Read only

Former Member
0 Likes
1,300

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

  1. Navigate to the correct position (which almost always takes several keystrokes)
  2. Type the start of the template name, Ctrl+Space, Enter
  3. wait a second - if you press Ctrl+1 too early, the quick fix proposal won't appear in the list
  4. Ctrl+1, perhaps navigate down, then Enter

That's a lot more keystrokes. It works, but there's room for improvement 🙂

Cheers

  Volker

Read only

schneidermic0
Product and Topic Expert
Product and Topic Expert
0 Likes
1,300

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