Book a Demo

Author Topic: drag and drop tagged values from toolbox  (Read 6591 times)

bachus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
drag and drop tagged values from toolbox
« on: July 22, 2014, 01:40:02 am »
Hello UML gurus !

I would like to know if there is a way to make TaggedValues available as drag and drop element from a toolbox menu ?

In the toolbox i'm working on, I can manage to make Attribute available as drag on drop elements. But somehow I don't find a way to do it with the tagged values.

Is there a way to describe TaggedValues as element when making an MDG technology ?

(I try to work with the TaggedValue connector, but it is misleading)

Thank you for your help,
I really appreciate it !

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #1 on: July 22, 2014, 02:15:51 am »
This is simply not possible. TVs are created along with an element creation.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #2 on: July 23, 2014, 09:02:49 am »
It's certainly possible, although you won't see your tagged value in the toolbox.

If you define a stereotype that contains the tagged value you want to add, it can be dragged onto an existing object to apply the tagged value. You could name the stereotype based on the name of the desired tag, to make it look more like you're just adding that tag.

If you're interested, the way this works is very similar to the intention of UML 2 where tagged values are just instances of properties owned by the applied stereotypes.

bachus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #3 on: July 24, 2014, 11:47:07 pm »
Thank you for your respond, it's a clever of doing it !
But it raise one problem. I would like to add Tagged Values to Attributes, and Class, etc.

Is there a way to do a generic Tagged value that can be applied "any" elements ?
E.g. If I add a tagged Value"ON" to a Class element manually I don't need to add an attribute which contains the TV "ON".
But I would also like to add a TV "ON" to an attribute (not specifically from that Class).
With a generic TV I could narrow the toolbox size !

Can you see a way to do it ?
Using an Addin is the only solution ?

Thanks !

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #4 on: July 25, 2014, 09:10:09 am »
The easiest way is to just define a tagged value type (in an MDG technology or not) and select it from the drop-down when creating a tagged value on anything.

You could still go the route of defining a stereotype that extends multiple types, but you won't be able to drop it onto attributes. I'm not sure it would make anything easier to use in general.

bachus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #5 on: July 30, 2014, 10:42:31 pm »
hello and thanks for your comments !

I've decided to implement every component I need with theirs specified Tagged values.

In the same subject I have a question regarding the created elements from my MDG technology.
Then I drag elements onto my diagram, the "stereotype" field contains the name of the Stereotype element I created to build my toolbox.

I would like to get ride of this, and leave the "stereotype" field empty.
But I don't if there is a way to do it ? As EA needs Profile element to extend metaclass...

Any hints on this are welcome !!  ;)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #6 on: July 31, 2014, 08:20:57 am »
Well, the stereotype is what triggers all that wizardry. You can not leave it empty.

q-

bachus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #7 on: August 01, 2014, 07:46:35 pm »
And is there a way to clear the stereotype field when I drop the element on the diagram ?
Maybe with the use of Addin ?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #8 on: August 01, 2014, 08:07:11 pm »
That should be feasible. You need to catch the OnPostNewElement event and modify the stereotype. I remember having done something along those lines but my memory is lost in the fogs of the past.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #9 on: August 04, 2014, 09:28:59 am »
Clearing the stereotype will remove the tagged values associated with it.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: drag and drop tagged values from toolbox
« Reply #10 on: August 04, 2014, 09:34:50 am »
Ah. Right. Since the new versions the tags are created on the fly. In former versions they were only created along with the element. So unless you downgrade to some (I guess) pre 8 release you won't be lucky then.

q.