Book a Demo

Author Topic: reuse of UML elements as a library  (Read 2807 times)

christian

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
reuse of UML elements as a library
« on: March 18, 2009, 01:52:58 am »
Hi,
I have EA 7.0, C++ and want to reuse e.g. UML components, which is possible via putting the elements in the browser and paste them as instance. There is also the possibility to paste them as new objects, but it seems that it is only possible if I copy elements from a diagram.

So far everything is OK, but now I want to paste elements with manually added source code. I tried it as pattern and from the browser but nothing worked. XMI im-/export is not allowed because of usability reasons->it shall have drag & drop functionality.

The process would be:
1. create UML elements
2. add source code
3. store the element somewhere (toolbox, pattern or browser??)
4. reuse the elements by drag&drop: the elements must have a new GUID and the source code put in in step before

Does anyone knows a solution?
Thankx!

Christian
« Last Edit: March 18, 2009, 01:57:18 am by christian »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: reuse of UML elements as a library
« Reply #1 on: March 18, 2009, 09:30:31 am »
Patterns should work. I think you need to save your code into the "Initial Code" field for each of the class's operations (on the "Behavior" tab of the operation's Properties dialog).
The Sparx Team
[email protected]

christian

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: reuse of UML elements as a library
« Reply #2 on: March 19, 2009, 07:46:25 pm »
Hi,

many thanks. I will try this solution next week and give feedback.
 :)

Christian