views:

4486

answers:

4

I know most of the java development tools for Eclipse will have a short-cut script for adding in JavaDoc blocks for needed elements (including the page-level).

Further, I know that PDT will allow you to "Generate Element Comment" for many things through the Source menu.

Is there an Eclipse plug-in out there (or perhaps it exists standard in PDT and I've just missed it) that will allow you to add PHPDoc Blocks for all/some of the supported elements in a given file?

+2  A: 

In PDT 1.3:

Preferences > PHP > Editor > Typing > Automatically close > Phpdoc and comment regions (Check) > Add Phpdoc tags (check)

Also, modify your templates to include more Phpdoc: Preferences > PHP > Templates

jakemcgraw
A: 

One thing I did find that looks helpful (still not what I'm looking for, as it doesn't effect already entered code, but still helpful)

Preferences > PHP > Code Style > Code Templates > Automatically add comments for new methods and types.

However, I can't get it to stick (stay checked).

J. Kenzal Hunter Sr.
A: 

Hello, place your text cursor right above your function, class or whatever, type /** and press enter and you'll have a beginning of PHPDoc written. Eg. /** * * Enter description here ... * @param unknown_type $book * @param unknown_type $product */

You can then write @ inside the comments, and use @ followed by ctrl+space to get auto-completion hints for PHPDoc tags.

myselfhimself
A: 

However, I can't get it to stick (stay checked).

I have the same problem, it's not sticking. My problem is when I run the Wizard I get no PHPDoc comments.It seems PHPDoc is tied to RemoteSystemFiles and this is empty.

How do you tell PHPDoc which folders / files / functions to index? Mine is always empty.

Eugene van der Merwe