Book a Demo

Author Topic: Generating Java Code with Annotations  (Read 3214 times)

Aruanda Simoes

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Generating Java Code with Annotations
« on: May 15, 2008, 06:34:05 am »
I am having some trouble synching java code.
When the class contains annotations the generated code always moves all annotations of each attribute to a single line.
The "remove hard break from comments" option is disabled.

Any suggestions?

Thank you,
Aruanda

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating Java Code with Annotations
« Reply #1 on: May 15, 2008, 11:22:07 am »
You'll have to modify the code templates.

Aruanda Simoes

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Generating Java Code with Annotations
« Reply #2 on: May 17, 2008, 12:37:09 am »
Simon,

Thank you for answering.
I am trying to modify the templates.
The Class Declaration template contains a reference to the 'annotations' tag:
%classTag:"annotations"%

How do I create a custom annotations tag that supports line feeds?

Thank you,
Aruanda

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating Java Code with Annotations
« Reply #3 on: May 19, 2008, 08:47:52 am »
You'll need to use replace.

Try replacing "\n" with " ", or possibly "\n@" with " @".