Book a Demo

Author Topic: How to add text to end of file  (Read 3413 times)

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
How to add text to end of file
« on: August 03, 2010, 09:03:45 am »
Our coding standard requires a tag of the form...

// end of file XYZ.cpp

... to be placed at the end of every file.

How can I set up the code generation template(s) so that this tag is generated automatically (with the correct file name) at the end of every file?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to add text to end of file
« Reply #1 on: August 04, 2010, 08:15:03 am »
Add
Code: [Select]
// end of file %fileName% to the end of File template and
Code: [Select]
// end of file %fileNameImpl% to the end of the File Impl template.

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: How to add text to end of file
« Reply #2 on: August 04, 2010, 08:46:47 am »
Thanks, Simon.  I thought it would be something simple like that but I saw those big signs midway down those files that said "WARNING: DO NOT MODIFY THIS TEMPLATE BELOW THIS POINT" so I figured I'd better check with somebody first.  :-)


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to add text to end of file
« Reply #3 on: August 04, 2010, 02:48:01 pm »
Yeah, what it should really say is don't modify the following list.  (Or not even say that.)