Is there a way to generate JsDoc comments for an entire project at once?

I've been spending a lot of time trying to find a way to generate JsDoc comments for an entire project both in WebStorm and Intellij, but I haven't found anything about it.

The explanations always converge to the same point: "you type /**<enter>' then a minimum JsDoc comment will be generated just in front of your eyes. Isn't it wonderful?" Of course it is, under some circumstances.

HOWEVER, when you have a big project that has no JsDoc comments on it,  and you need to get a technical overview about the project, its classes and methods, etc. through technical documentation (not by digging into the code line-by-line), it sounds quite unbelievable that you have to go to the code, and type "/**<enter>" for each method, function, class you find.

So, I assumed that we could be able to do that in a few clicks. Maybe I'm too tired and distracted today, but I wasn't able to find a way to do this. I also took a look at other tools but it seemed that all of them require that the in-code documentation exists so they can parse it and generate the external documentation as html or another format.

Besides a few hours of rest, what am I missing?

Thanks.

4 comments
Comment actions Permalink

I'm not aware of any way to generate doc comments for entire file/project, neither in the IDE nor using external tools available on the web:(

0
Comment actions Permalink

Hi, Elena.

So, it seems this can become a great opportunity to keep JetBrains ahead of its competitors, isn't?

Meanwhile, I was wondering that maybe it's possible to use the current IntelliJ resources to mitigate this problem. For example, do you think that the use of macros could do that? I'm thinking about assign a shortcut to a macro that simulates typing "/**<enter>".

What do you think?

0
Comment actions Permalink

UPDATE

Just created a macro with the following commands:

Action: MethodDown
Action: EditorLineStart
Typing: "/**"
Action: EditorEnter
Action: EditorDown
Action: EditorDown

It worked fine!

Is it safe to edit the macro commands in the macros.xml file? It seems that the Edit>Macros>Edit Macros option doesn't allow us to add or edit a macro command. Not very useful.

0

Please sign in to leave a comment.