[SOLVED] Comment block template available when creating new C C++ source files?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Comment block template available when creating new C C++ source files?

    Hi, I'm Matthew. I use

    - 64-bit SES 3.30 on 64-bit Windows 10

    - J-Link Plus or onboard J-Link (Nordic's dev kits have a J-Link on the board itself)

    - J-Link 6.16h

    - Nordic's PCA10040 v1.1.1 board (this board uses nRF52832-QFAA MCU)




    My teammates have adopted Doxygen recently. So I was looking for some convenient features from SES to insert Doxygen related comments.

    When I create a new C/C++ source/header file with SES, just like the above picture, a blank screen shows up.

    C Source Code

    1. /**@file newFile.c */


    The @file must be used to declare the file name.


    Something like the above comment has to be inserted in the file. However, I had a hard time to add these comments manually all the time. As a result, I create new files using Sublime Text 3 and the DoxyDoxygen plugin .

    1. Can I configure a comment template that has various information (BSD/MIT/etc license format, file created date, author, @file filename.c, and more)?
    I wish that template to be written whenever I create a new C/C++ header/source file via SES.
    If I create a text file, I don't want the above template to be inserted.
    Hope to see a filename extension configuration (ex. template is inserted when creating a cpp/hpp/etc file, not txt/log file).

    2. Is there a way to add a keyboard shortcut to create or update a Doxygen comment block?
    [img]http://20tauri.free.fr/DoxyDoxygen/v2/_images/scr_first_word.gif[/img]


    Or is it available to use 3rd party plugins with SES?
    The above feature really looks nice to me and it would be cool if it is added into SES :thumbsup: .

    -Regards, Matthew
    -Best Regards, Matthew

    The post was edited 2 times, last by MatthewKyeo ().

  • Hi Matthew,

    Embedded Studio currently only supports some generic templates that can be entered through the menu (Edit -> Templates) or through code completion suggestions.
    Custom templates are already on our list for improvements. This would enable you to create whole comment blocks with one shortcut. Dynamic input of function name and parameters into the comment is not supported.
    We will also add file templates for new files to the wishlist.

    There are no 3rd party plugins for ES, but you can call external tools on your files, e.g. to open them in an external editor or to run code analysis tools.
    That can also be used to open any external tool to convert and insert doxygen comment blocks.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.