Book a Demo

Author Topic: Setting text length in Operations->Behavior  (Read 2311 times)

EricP

  • EA User
  • **
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Setting text length in Operations->Behavior
« on: September 26, 2010, 12:50:27 am »
Good morning all... I realize this is something I should find in the Help, however I looked everywhere I could think of and could not find any information.

Right click on a class and select Operations, then select an operation and select Behavior.  Two text boxes show up:  Behavior and Initial Code.

When code is generated from the class using (right click)->Generate Code, the contents of the Behavior box is included in the source code within the body of the method.

Two questions...

1.  The text in the Behavior box word-wraps at 80 characters in the source file.  How can I set it to word-wrap somewhere else e.g. 120 characters?

2.  If I don't want the contents of the Behavior box to be included in the source file, how do I turn that off?

Thanks...
« Last Edit: September 26, 2010, 12:51:24 am by rkt-med »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8090
  • Karma: +118/-20
    • View Profile
Re: Setting text length in Operations-
« Reply #1 on: October 04, 2010, 08:44:19 am »
1. Tools | Options | Source Code Engineering | Wrap long comment lines at:
2. Edit the operation body template.  You will see something like the following depending on the language you are generating code for.  Just remove it.

Code: [Select]
$wrap = %genOptWrapComment=="-1" ? "-1" : "40"%
$behavior = %WRAP_LINES(opBehavior, $wrap, "\t//", "")%
%if $behavior != ""%
$behavior\n\n
%endIf%
« Last Edit: October 04, 2010, 08:45:03 am by simonm »