X

ApiGen support added

Hi all, today we would like to show you how you can generate very nice API documentation of your projects with ApiGen.

Citation from http://apigen.org/:
ApiGen is the tool for creating professional API documentation from PHP source code, similar to discontinued phpDocumentor/phpDoc.

It works the same way as the current PhpDoc support. So, please install it and just verify in Tools > Options > PHP > ApiGen that NetBeans is able to detect it correctly (this should work for PEAR installation); if not, simply select the ApiGen script manually using the Browse button:

ApiGen IDE Options

Next, verify that ApiGen properties of your project are also correct:

ApiGen Project Properties

As you can see, a configuration file can be provided. This configuration file is in the Neon format, which NetBeans supports as well.

If everything is as you wish, just generate the API documentation:

Generate documentation via ApiGen

NetBeans will inform you about the progress in the Output Window:

ApiGen in work

If the process is successful, your WWW browser is opened with the generated documentation:

Generated Documentation

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans BugZilla (component php, subcomponent ApiGen).

Join the discussion

Comments ( 22 )
  • Daniel Siepmann Thursday, January 12, 2012

    How to install the ApiGen support in NetBeans? I doesn't have it yet and there seems to be no plugin.

    There are some plugins in the net, but they don'T look like the Screens.


  • Tomas Mysik Thursday, January 12, 2012

    @Daniel Siepmann: This blog is mostly about features available in the development version of NetBeans [1] (so they will be part of the next stable version of NetBeans).

    [1] http://bits.netbeans.org/download/trunk/nightly/latest/


  • Daniel Siepmann Thursday, January 12, 2012

    @Tomas Mysik: Thanks


  • Tomas Mysik Thursday, January 12, 2012

    @Daniel Siepmann: You are welcome.


  • vgrigory Tuesday, January 17, 2012

    Hello,

    thanks for useful introduction. Great tool.


  • Maghiel Dijksman Friday, January 20, 2012

    Note for users that are having problems installing Nette (which is a dependency of ApiGen) through PEAR:

    The package.xml of Nette seems to have an error in it. (And yes, I updated all the channels and all PEAR packages.)

    What worked for me was editing the package.xml, and putting a <notes/> tag just before <content/>. Also note that <notes/> cannot be empty (why???). So just put something like <notes>My note</note>.

    After that create a new archive, and install it using "pear install mynette.tgz"


  • JeffRubinoff Thursday, January 26, 2012

    I had no trouble installing Nette through PEAR. Maybe they've fixed that bug.

    However running ApiGen from NetBeans fails for me with "Option --template-config expects value" error


  • JeffRubinoff Monday, January 30, 2012

    Well it looks like there was something odd with my PEAR installation of ApiGen. It was through the PEAR in XAMPP and frankly I've had issue with it in the past.

    The standalone ApiGen worked fine for me.


  • guest Sunday, February 5, 2012

    I am running Netbeans 7.1 under Windows Xp Pro. I have downloaded the Apigen plugin for Netbeans from "Netbeans Plugin Portal"

    When trying to install it Netbeans says :

    1.- Some plugins require plugin PHP APIs to be installed

    2.- Some plugins require plugin PHP PROJECT to be installed

    What shall I do??


  • Tomas Mysik Monday, February 6, 2012

    @guest: Hard to say since you have downloaded some other ApiGen plugin; the plugin from this blog post is available only in the development version of NetBeans (which will become NB 7.2 one day). Of course, you can already try it, the download link is in the blog post.


  • guest Wednesday, February 15, 2012

    Hi,

    i would like to know how to disable the buildin ApiGen support in the current development version of Netbeans.

    I am using a windows system and the buildin ApiGen could not being configured to work anyway.

    Btw. ApiGen with a modified ApiGen.bat/cmd (doing parameter mapping) works as expected with the additional phpDoc plugin.


  • Tomas Mysik Wednesday, February 15, 2012

    @guest: Sorry, I don't fully understand what you mean exactly. Could you please submit a bug [1] with steps to reproduce?

    Thanks.

    [1] http://netbeans.org/community/issues.html


  • guest Tuesday, September 4, 2012

    Hi.

    You said, and quoting:

    the plugin from this blog post is available only in the development version of NetBeans (which will become NB 7.2 one day)

    I'm presently running stable 7.2, wich I was hopping that it had apigen plugin.

    Looks like it doesn't, neither I can get it from central plugins repository, or maybe I'm missing something...

    Do I have to install current night build in order to "play" with apigen plugin?

    Thanks anyway, for all the knowledge you've been throwing at us

    Best regards

    N.C.


  • Tomas Mysik Tuesday, September 4, 2012

    @N.C.: Just download NB 7.2, open your PHP project and invoke "Generate Documentation" in its context menu. ApiGen settings can be found in Tools > Options > Php > ApiGen.


  • C&eacute;sar de la Cal Thursday, May 7, 2015

    Hi! Is there any ETA until Netbeans supports the new Apigen syntax? It's been a while since they launched a new version and since then netbeans has been unable to work with it.

    Thanks!


  • Tomas Mysik Thursday, May 7, 2015

    @César de la Cal: It is already supported but unfortunately you need to use the dev version of NetBeans (which will become NB 8.1 later).

    Thanks.

    [1] http://bits.netbeans.org/download/trunk/nightly/latest/


  • C&eacute;sar de la Cal Thursday, May 7, 2015

    @Tomas That's fantastic news to hear. I'll wait for the NB 8.1 release then!

    By the way, I never did so and so I thought I'd tell you guys that I appreciate the work you do A LOT and that Netbeans has quickly become my IDE of choice.


  • Tomas Mysik Thursday, May 7, 2015

    @César de la Cal: Thanks a lot for your positive feedback! BTW NB 8.1 will take some time, feel free to try the dev build, it should be usable (and you can always switch back to stable version of NB if any problems appear [you would report all such problems, right? ;]).

    Thanks!


  • Troy Marker Wednesday, June 29, 2016

    I can not get apigen to work in the IDE. I have the apigen.phar in F:\Apigen, and have inserted that line in the Tool->Option->PHP->Apigen script line.

    When I go to generate my documentation, the output window lists the command, and tells me that it is scanning the source files. It does not list any results of the scan, and after a few minutes, says it is done. I am not sure what I am doing wrong. Any help would be greatly appreciated.

    Thanks,

    Troy


  • Tomas Mysik Friday, July 1, 2016

    @Troy: Please, use latest version of NetBeans as well as ApiGen, it should work. If not, please use Bugzilla to report an issue.

    Thanks.


  • Troy Marker Saturday, July 2, 2016

    Thomas,

    Thank your for responding. I am running the latest versions of NetBeans (8.1) an ApiGen (4.0). I have tested apigen from the command line, and it works. But in NetBeans, it does nothing. can you please provide a link to Bugzilla so I may submit my bug. Thanks again.

    Troy


  • Tomas Mysik Monday, July 18, 2016

    @Troy: As always, the link to Bugzilla can be found in the last paragraph of every blog post (see above).

    Thanks.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services