Book a Demo

Author Topic: Problems with Comments: Reverse Engineering C-Code  (Read 3162 times)

Jeronimo

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Problems with Comments: Reverse Engineering C-Code
« on: December 03, 2010, 04:07:14 am »
Hi,
I imported C-Source-Code in a Class Diagram using the reverse engineering option. I'm using Javadoc-Style Comments with Doxygen for each file and each function like in this example:

/** @StartHeader
 *
 * @brief      Purpose of this file.
 *
 * @filename   filename.c
 * @author     Jeronimo
 * @date       02.12.2010
 * @project    My Project
 *
 * @copyright  2008-2010 ...
 *
 ** @EndHeader */

#include "filename.h"

/* -----------------------------------------------------------------*/
int x; /**< description of variable */

/**
 * @brief Short description of the following function.
 *
 * @param myParameter
 * ...
 */
void foo(int par)
{
    ...
}

When I'm importing this source code EA ignores the file header and takes the last comment before the first statement as Note for the generated class ( in this case the line above the declaration of the variable x  /*---...---*/).
The next problem is, if I change the notes of the class and reverse synchronize the source code with the model later, then the notes written in EA will be overwritten by the comments in the source code.
How can I avoid this?
P.S.:
I already tried to deactivate  Notes in the options menu for C Source Code Engineering...