Book a Demo

Author Topic: Pasting Packages  (Read 2759 times)

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Pasting Packages
« on: March 01, 2008, 09:00:59 am »
I'd like to update a Package diagram and make a newer version. However, EA does not allow pasting Packages 'as new'. (Why is that??) Is there a way to accomplish this without redrawing all of the Packages?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Pasting Packages
« Reply #1 on: March 02, 2008, 12:50:32 am »
I might not understand just what you want to accomplish Frank.

Perhaps the problem you are having relates to the fact that packages can have a much 'deeper' structure than other elements. This is particularly important with several UML tools, due to the way they handle packages internally. EA is one of those.

If you want to create a new copy of the package tree(s) and change things around, what about an XMI export-import cycle?

Just remember to be careful about stripping GUIDs (or not). Remember that if you do not strip the GUID, EA treats an imported item as if it were the same as any it already has in the model (with the same GUID). It will (usually) overwrite the old (in the model) with the new (in the XMI stream). Try this on copies of your model(s).

David
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: Pasting Packages
« Reply #2 on: March 06, 2008, 07:11:45 am »
Thanks, David,

I guess I don't understand why I can't just copy and paste a package as I would any other type of element, such as a class. I.e., why is this limitation imposed by EA?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Pasting Packages
« Reply #3 on: March 06, 2008, 07:19:32 am »
I think it has to do with the fact that a package has a much 'deeper' structure than any other element. That's likely coupled with the (many) special ways that EA treats and uses packages. [This last part is not unique to EA; many UML products use packages for their own purposes. This is in accordance with how UML was designed.]

I also suspect - entirely without proof that EA makes pretty heavy use of the Windows clipboard when doing (simple) copy operations. Trying to make this work with packages would be a nightmare, if it could be made stable at all.

Since EA already has a facility to export and import packages, with the option whether or not to retain the identities of elements (strip GUIDs), it makes sense to reuse this function for package copy.

Think of this not so much as copying a package element from one spot to another, but rather as copying a package tree from one branch in a model hierarchy to another (possibly in a different model). Taken in that context the whole picture seems to come into focus.

David
No, you can't have it!