33

I'am looking for an eclipse-plugin for doxygen code documentation. I have found the eclox-plugIn ( http://home.gna.org/eclox/ ). I would like find out, how can it automatically generate a "empty" doxygen comment, which could be filled out later or what is the better choice for a documentation eclipse plugIn?

For example for a function: void f(int p1, int p2, ...), it should generate:

/*! \brief ...
    \param p1 ...
    ..
*/ 

PS I'm using for mainly the c/c++ languages

Antonio
  • 19,451
  • 13
  • 99
  • 197
LonliLokli
  • 1,295
  • 4
  • 15
  • 24

3 Answers3

93

A different (better) approach than my previous answer:
In Window->Preferences->C/C++->Editor,
In the right tab look for "Documentation tool comments", and in "Workspace default" set doxygen.

Now you can type /** above a function and press return.

/**
int foo(int bar);

becomes

/**
 * 
 * @param bar
 * @return
 */
int foo(int bar);
Antonio
  • 19,451
  • 13
  • 99
  • 197
tauran
  • 7,986
  • 6
  • 41
  • 48
23

See updated solution.


Old answer:
In eclipse helios in window->preferences you can do: c/c++->Code Style->Code Templates->Comments + Automatically add comments for new methods and classes

You can configure the comment style here, but it is not as smart as it should be. If you find something better, I would be very happy...

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
tauran
  • 7,986
  • 6
  • 41
  • 48
7

For Project specific settings
In Project->Properties->C/C++ General:

  • Tick Enable project specific Settings
  • Select Doxygen as Documentation tool

Then typing /** above the function/method and hitting enter will work. See here.

Community
  • 1
  • 1
Antonio
  • 19,451
  • 13
  • 99
  • 197