Monday, April 23, 2012

Automatic Documentation generation using eclipse and doxygen plugin - Eclox

Documentation is a process which most programmers feel lazy about doing but is quite important for future reference and also for people to contribute to the project. Doxygen is a tool for writing software reference documentation. The documentation is written within code, and is thus relatively easy to keep up to date. Doxygen can cross reference documentation and code, so that the reader of a document can easily refer to the actual code.

Eclipse is a favourite IDE for many programmers and Doxygen integraion can easily be done with   the existing setup:-

Installation steps:-
  1. Download and install Doxygen executable from the official site depending on OS and PC architecture.
  2. Eclox Installation :-
    1. INSTALLATION
      There are two options to install the plugin: using the update site or using the packaged feature.
      The update site is the more convenient way to install eclox. It is located athttp://download.gna.org/eclox/update. See eclipse's user guilde for additionnal details.
      When using the packaged feature, you must extract the archive content into your eclipse's root location. For additionnal details, please refer to eclipse's user guide.
    2. CONFIGURATION

      Once the plugin installed, you must ensure that the default PATH environment variable makes the doxygen binary reachable for the plugin. If not, you can update PATH to include to directory containing the Doxygen binary, or you can tell Eclox where that binary is located on your system (which is in my opinion the better solution). To do this, open eclipse's preference edition dialog window and go into the new "Doxygen" section.
    3. USAGE

      You can create new Doxygen projects (also called doxyfiles) using the creation wizard. Go to "File->New->Other->Other->Doxygen Configuration". Press next and set both file location and name. Then a empty doxyfile will be created at the specified location, the wizard automatically adds the ".Doxyfile" extension.
      You should now see a file with a blue @-sign icon. This is your new doxyfile. Double-clicking on it will open the editor. You can now browse and edit the settings.
      Once your have properly set all doxyfile fields, you can launch a documentation build using the toolbar icon showing a blue @-sign. In the case the button is not visible in the toolbar, your current perspective needs to get configured. Go to "Window->Customize perspective->Commands" and in "Available command groups" check "Doxygen". Additionnaly, you can browse the laetest builds by clicking the down arrow right to the toolbar button.

      When the documentation build starts, a new view showing the build log opens. In its toolbar, a button named "Stop" allows you to halt the current build process. The current build also appears in the Eclipse job progress view and you can control the job from there.
      The build toolbar action determine the next doxyfile to build depending on the current active workbench part (editor or view) and the current selection in that part. For example, if the active part is a doxyfile editor, the next doxyfile to build will be the one being edited. If the active part is the resource explorer and the current selection is a doxyfile, that doxyfile will be next to get build. In the case the active part selection doesn't correspond to a doxyfile, the last built doxyfile will be rebuiled. And if the build history is empty, you will be asked for the doxyfile to build.

      For enabling Doxygen style in CDT




1 comment:

nvd said...

"The update site is the more convenient way to install eclox. It is located athttp://download.gna.org/eclox/update. See eclipse's user guilde for additionnal details."

Please specify that the link
http://download.gna.org/eclox/update

should be entered as below:

"Help -> Install New Software... -> Work with"

Thanks for the nice tutorial.

Post a Comment