Change doxygen comment style in Eclipse

后端 未结 5 990
南笙
南笙 2021-02-01 03:28

Does anyone know how to edit the style used for Doxygen comments in Eclipse CDT?

In other words type /** and pressing enter on a line before a function curren

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-01 03:49

    Yes, this seems to be a bug in Eclipse CDT.

    As a workaround I suggest you create a custom template which can be accessed with the Ctrl+Space key combination.

    In Eclipse Helios: Window -> Preferences -> C/C++ -> Editor -> Templates

    Click on New... to create a new template and in the Name field use some descriptive name e.g. "comment-function", and add your doxygen comment in the Pattern field. Confirm and apply this change.

    In your code you can then go to the line above your function declaration, type the first few letters of your custom template name followed by the Ctrl+Space key combination.

    In this example:

    com
    

    will bring up the Content Assist dialog filtered with "com*" from which you can select the "comment-function" template.

    Note:

    com
    

    will filter even further by only showing Template Proposals in the Content Assist pop-up window.

提交回复
热议问题