Book a Demo

Author Topic: Note line breaks lost on code synchronization  (Read 3919 times)

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Note line breaks lost on code synchronization
« on: June 17, 2011, 12:54:44 am »
EA 9.0 (906)

When synchronizing my C++ classes (F7), the class comments lose all line breaks.

I use doxygen line comments, e.g.

//! This is the brief description

//! This is the more elaborate description,
//! which can span multiple lines


The resulting notes look like this

! This is the brief description ! This is the more elaborate description, ! which can span multiple lines

I understand the unwanted "!", although I would be interested in getting rid of them, too.

But my main question is: Why does EA remove the line breaks?

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Note line breaks lost on code synchronization
« Reply #1 on: June 17, 2011, 12:57:24 am »
Correction: EA completely removes the line "
//! This is the brief description" from the class notes when synchronizing. How can I tell EA to synchronize both the brief and elaborate description of the class, and put it into the note field?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Note line breaks lost on code synchronization
« Reply #2 on: June 17, 2011, 01:01:55 pm »
If you don't have a blank line between them.

EA is seeing that and determining that they are unrelated comments. (Which in most circumstances is a reasonable thing to do)

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Note line breaks lost on code synchronization
« Reply #3 on: June 17, 2011, 04:14:25 pm »
Quote
If you don't have a blank line between them.

EA is seeing that and determining that they are unrelated comments. (Which in most circumstances is a reasonable thing to do)

The blank line is a very convenient way to get Doxygen brief comments.
However, if EA determines they are unrelated comments, where does the "brief" comment end up in EA's model? It's just as reasonable to assume that all comments in front of a class are related to that class, is it not?

Still, the more puzzling thing is my original question regarding line breaks.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Note line breaks lost on code synchronization
« Reply #4 on: June 20, 2011, 08:36:45 am »
Your brief comment won't end up anywhere in the model because as far as EA is concerned, it doesn't belong to anything. On the plus side, code generation when synchronizing won't touch it at all.

Tools | Options | Source Code Engineering | Remove hard breaks from comments on import.
« Last Edit: June 20, 2011, 08:39:21 am by simonm »

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Note line breaks lost on code synchronization
« Reply #5 on: June 20, 2011, 08:04:45 pm »
Thank you for the option hint. It now retains hard line breaks - for most classes.

I have one class in particular where the header file contains hard line breaks in the class comment section, but these are omitted in the EA comment after synchronizing.

I do not see any difference between the header files that work now and the one that doesn't - they were written in the same style by the same author using the same tool.

Inspection in Hex edit mode reveals the comment lines end with CR/LF (0D 0A in Hex). Still - EA does not seem to accept these line breaks.

Are there further options I might need to set?
How can I further investigate this issue?