Book a Demo

Author Topic: Copy Attributes and Operations?  (Read 4069 times)

DMT

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Copy Attributes and Operations?
« on: July 16, 2003, 10:56:13 am »
Does anyone know if there's a way to copy attributes and operations between classes? I know you can copy entire classes, but being able to copy individual pieces of a class would be a big benefit to me.

brucef

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Copy Attributes and Operations?
« Reply #1 on: July 16, 2003, 06:57:41 pm »
Create a class diagram and drop your target class onto it. Open the source class in the workspace browser. Drag the attribute/operation onto the target class. It will be copied, not moved.

It doesn't seem to be entirely natural, but it does work. Mostly. I have managed to lock up EA a couple of times.

Bruce Fountain

DMT

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: Copy Attributes and Operations?
« Reply #2 on: July 17, 2003, 04:50:58 am »
AWESOME!  Thanks, Bruce.  This is EXACTLY what I was looking for.

Dave

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
Re: Copy Attributes and Operations?
« Reply #3 on: July 18, 2003, 04:11:38 am »
Another trick to copy operations:
Create an inherit relationship from the target class to the class that has the operations. Select Override Operations/Interface and check the operations you want to copy. Delete the inherit relationship when you are finished.

Mikkel