Book a Demo

Author Topic: How to add attributes directly in the Class box  (Read 5720 times)

lrobledano

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
How to add attributes directly in the Class box
« on: February 12, 2013, 02:03:05 am »
When adding an attribute to a class within the class diagram it seems I need to:
1) double-click, and open class dialog
2) Click Properties->Details
3) Click Attibutes
4) Add attribute1 in the different fields name, type
5) Click Add
6) Click New
7) Repeat from 4 for each new attribute (and watch out don't forget to click new or you will overwrite!)
8) Close.
All of those steps in very different distribution around the windows, and combining keyboard and mouse.

If I want to add one more I have to go there to 1) again.
Was there no way to just edit it easily from the Class box?
1) Click in attributes area with in the class
2) type "attributename: type", Enter goes to create the next one. (If I click Enter and there is no content, the empty attribute is not saved and focus jumps out to the class.

If there is a way to fast edit attributes... I don't find it :(

I thought there was a way, but maybe it was in another Tool WithClass, 10 years ago... :P.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: How to add attributes directly in the Class bo
« Reply #1 on: February 12, 2013, 02:31:52 am »
Hi,

with F9 you can go straight to Attributes.

With Shft, Ctrl+F9 you can add an attribute to a class in a diagram.

View Toolbars, Element is also a good choice.

Kind regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

lrobledano

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: How to add attributes directly in the Class bo
« Reply #2 on: February 12, 2013, 03:19:17 am »
Thanks! :D
The Shft,Ctr,F9 is almost perfect ;)

Gary

  • EA User
  • **
  • Posts: 84
  • Karma: +1/-0
    • View Profile
Re: How to add attributes directly in the Class bo
« Reply #3 on: February 12, 2013, 07:26:43 pm »
Quote
and watch out don't forget to click new or you will overwrite!)
Go to Tools->Options->Source Code Engineering->Attribute/Operations
and uncheck the item in options called After Save, re-select edited item.
Now when you hit save after creating an new attribute it will clear the box ready for adding the next one, no need to hit new.

lrobledano

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: How to add attributes directly in the Class bo
« Reply #4 on: February 12, 2013, 07:49:10 pm »
Thank you Gary,
I wonder whether "Source Code Engineering" is the best location for such a feature... ;)

In any case Shft, Ctrl, F9 is closer to what I wanted, therefore not need to go the the dialog any more. However good know.

Regards,
Luis

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to add attributes directly in the Class bo
« Reply #5 on: February 14, 2013, 08:53:12 am »
You can also use Ctrl+Enter when editing to save the current feature and start editing a new one of the same type.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: How to add attributes directly in the Class bo
« Reply #6 on: February 14, 2013, 04:02:36 pm »
Thanks Simon,

your tip is very useful.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)