Book a Demo

Author Topic: template write in attribute notes  (Read 4593 times)

MREA

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
template write in attribute notes
« on: October 31, 2012, 11:27:01 pm »
is it possible that the template write something into the notes of the attr/operation?

e.g.

Code: [Select]
%if $comment != "" %
...........
%else%
* No description available...\n
*\n
*/\n
%endIf%

the "No description available..." should be reverse to the model.

%opNotes%= "....." does not work, so is there perhaps a setter fct?
Support- Languages: German, English, French

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: template write in attribute notes
« Reply #1 on: November 01, 2012, 08:39:42 am »
Code: [Select]
%if opNotes != ""%
%JAVADOC_COMMENT(genOptWrapComment)%
%else%
/*
 * No Description available.
 */
%endIf%

MREA

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: template write in attribute notes
« Reply #2 on: November 05, 2012, 05:24:09 pm »
sorry I mean the else part!

else he should put "no discription available" into the model.

e.g OP1() does not have a comment.
so while generating the code "no discription available", sould be written into the model, otherwise I get a Comment in Comment in the code.
e.g

"no discription available
"no discription available""
Support- Languages: German, English, French

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: template write in attribute notes
« Reply #3 on: November 05, 2012, 05:37:51 pm »
Code templates can't (and should never) write to the model.

However, if you reverse engineer the generated code the desired note will be imported into the model.

MREA

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: template write in attribute notes
« Reply #4 on: November 05, 2012, 05:43:27 pm »
mhh ok :(
so I've to tell everyone to do so
Thank you!
Support- Languages: German, English, French