Book a Demo

Author Topic: Property auto-generate field!  (Read 2116 times)

PedroLuz

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Property auto-generate field!
« on: April 06, 2008, 04:24:51 am »
Hello there! There is any way to make Enterprise Architect generate a field for each property that i make in a Class?

Like, i create a new property called name of the string type

there is any feature of Enterprise Architect that generates a variable named _name of the type string

Yeah, it's kinda boring make another attribute just for adding a field to the property you've just created!

Oh, by the way, im using C#

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Property auto-generate field!
« Reply #1 on: April 06, 2008, 11:17:49 pm »
Hi Pedro,

Good news. Yes, this is fairly easy to do once you know where to look.

Open the Tools | Options | Source Code Engineering dialog. Now look near the bottom of the dialog - below the second divider line - for some naming conventions. Here's where you will set up the relationship between the field (i.e. attribute) name and the property name.

Now when you create a new attribute for a class, click the Property check box. You may have to save the attribute first. You'll be presented with a dialog where you can set read and write access, as well as some other settings.

HTH, David
No, you can't have it!