Book a Demo

Author Topic: Extend Non-UML Types  (Read 4985 times)

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Extend Non-UML Types
« on: April 21, 2015, 09:01:38 pm »
Hello,

I would like to create a custom toolbox with whiteboard elements, such as simple circle, arrows, cloud, etc.
The challenge is not to assemble them to my custom toolbox, but to extend them first- in order to set default color and other properties.

What I tried:
1. I dragged a cloud element on a profile diagram, changed its stereotype to "metaclass".  
2. To this I added an extended element called "cloudExtensionTest".
3. I added a stereoype  to the toolbox page is MyToolbox::cloudExtensionTest(Whiteboard::Cloud).

Result:
A cloud element is added to toolbox with the appropriate icon, but cannot be dragged to diagram: simply nothing happens after the little "+" icon appears.

Any ideas?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Extend Non-UML Types
« Reply #1 on: April 22, 2015, 09:20:52 am »
On your profile diagram, create a «stereotype» class named "Whiteboard::cloud". Make it abstract. Draw a Generalization from your stereotype class to the cloud class. Also draw an Extension from your stereotype to "«metaclass»Class".

In your toolbox profile, add "MyToolbox::cloudExtensionTest(UML::Class)".
The Sparx Team
[email protected]

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: Extend Non-UML Types
« Reply #2 on: April 22, 2015, 08:30:27 pm »
Quote
On your profile diagram, create a «stereotype» class named "Whiteboard::cloud". Make it abstract. Draw a Generalization from your stereotype class to the cloud class. Also draw an Extension from your stereotype to "«metaclass»Class".

In your toolbox profile, add "MyToolbox::cloudExtensionTest(UML::Class)".

Thanks for the detailed instructions:
I followed them. The result: cloud element is dragged but looks like a class.

I would like the cloud to look like a cloud (without overriding its shape script myself), but extended: with a fill color-for example.

Any ideas?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Extend Non-UML Types
« Reply #3 on: April 22, 2015, 09:10:24 pm »
I guess you need to turn on the MDG on which it is based.

q.

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: Extend Non-UML Types
« Reply #4 on: April 22, 2015, 09:16:31 pm »
Quote
I guess you need to turn on the MDG on which it is based.

q.

This is a nice idea. In case there is a "<<>>" icon in the toolbox it means that the original MDG is off.

In my case, I have a nice cloudy icon, but the element cannot be dragged even though the original MDG is on.

Any more guesses?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Extend Non-UML Types
« Reply #5 on: April 22, 2015, 09:20:17 pm »
I'm confused now. Previously you said it looks like a class. Now you say it looks like a cloud but can not be dragged :-?

q.

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: Extend Non-UML Types
« Reply #6 on: April 22, 2015, 10:06:34 pm »
Quote
I'm confused now. Previously you said it looks like a class. Now you say it looks like a cloud but can not be dragged :-?

q.

Its icon looks like a cloud but element cannot be dragged.
In case I use KP's answer, the element can be dragged but its shape (and icon) are as class.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Extend Non-UML Types
« Reply #7 on: April 22, 2015, 10:19:39 pm »
So one after the other. Element can not be dragged. How that? Is it this single one on the diagram while others can be dragged?

q.

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: Extend Non-UML Types
« Reply #8 on: April 26, 2015, 06:15:37 pm »
Quote
So one after the other. Element can not be dragged. How that? Is it this single one on the diagram while others can be dragged?

q.
Indeed the element in cudtom toolbox has an icon with a cloud, but cannot be dragged to model.

Other stereotypes work fine.

Any ideas how to extend ArchiMate elements with a profile?