Book a Demo

Author Topic: Simple problem with toolbox items extension.  (Read 4924 times)

Sébastien Jahan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Simple problem with toolbox items extension.
« on: June 07, 2011, 06:06:54 pm »
Hi,

This is, i suppose, quite simple but i'm kind of newbie on EA development, and using diagram/MDG instead of code lines is quite disturbing to me ;).

I have to make a custom toolbox, so i followed the tutorials i found on the sparx website. This is nearly working, but not operational yet.
I get the display i'm expecting, but when i drag'n'drop items, i don't get anything.
I have a C# addin that listens on preNewElement function, and it detects nothing if i drag'n'drop one of my custom item so i guess there is a trouble.

Here is what i did in my profile:

I have a stereotype named OEAToolbox, extending the ToolboxPage metaclass.
I have two stereotypes: OEAToolbox::OEAInstance(UML::Object) and OEAToolbox::OEAClass(UML::Object). They're my items, and they extend the metaclass ToolboxItemImage.

In my stereotype OEAToolbox, i have the following attributes:

OEAToolbox::OEAClass(UML::Object) = Import a class
OEAToolbox::OEAInstance(UML::Object) = Import an instance

I guess there is something wrong with the way i'm extending UML::Object or something of that kind, but i really don't have a clue since my EA dev experience is really small....

Hoping you can help me :)
Thank you by advance and have a very good day,

SJ.
« Last Edit: June 07, 2011, 06:07:25 pm by sjahan »

Sébastien Jahan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #1 on: June 15, 2011, 05:23:10 pm »
I'm still stuck on the same problem, have you by any chance found a clue about it?

Thank you by advance, ;)
SJ.

Sébastien Jahan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #2 on: June 15, 2011, 11:18:55 pm »
Actually, i simplified the problem. The problem is that my toolbox is there, displayed, but when i drag an item, nothing happens.

I restart from scratch:
Now, i just have my stereotype named OEAToolbox, extending the metaclass ToolboxPage.

In my stereotype OEAToolbox, i have the following attributes:

OEAToolbox::OEAClass(UML::Object) = Import a class
OEAToolbox::OEAInstance(UML::Object) = Import an instance

In the toolbox, they correctly appear with the Object icon and the expected label, but when i drag, nothing.
What am i supposed to do so that my two items create a normal object?

Thank you by advance,
SJ.
« Last Edit: June 15, 2011, 11:19:29 pm by sjahan »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #3 on: June 16, 2011, 08:17:24 am »
It looks like you're providing the profile name of your toolbox instead of the profile name that contains the OEAClass stereotype.

Sébastien Jahan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #4 on: June 17, 2011, 01:20:27 am »
Well everything is in the same diagram of the same profile.
Maybe i totally misunderstand.

I used as example this pic i found on the website for icons.


To be sure i'm understanding correctly:

Here, MyElements is the toolbox, linking the item MyStereo through the attribute.
MyTech is the profile. I don't understand what means (My Elements) before the toolbox name.
Everything is in the same profile package.

My project is like that:

Model
 - <<profile>> OEAProfile
 - - OEAProfile //The class diagram where i edit the toolbox.
 - - <<stereotype>> OEAProfile::OEAClass(UML::Class) //Item
 - - <<stereotype>> OEAProfile::OEAInstance(UML::Class) //Item
 - - <<stereotype>> OEAProfile::OEAToolbox //Toolbox
 - - <<metaclass>> ToolboxPage

In OEAProfile::OEAToolbox, i have two attributes refering to the two items.
What am i missing? I'm quite lost with that kind of development...

Thank you for your help,

SJ.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #5 on: June 17, 2011, 08:28:02 am »
Ok, but you have created a toolbox profile, but now you need to create the profile for it to reference that describes the elements you want to create.

The example you got that from should have gone into that earlier. If not, find Developing Profiles in the help.
« Last Edit: June 17, 2011, 08:29:36 am by simonm »

Sébastien Jahan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #6 on: June 17, 2011, 05:16:15 pm »
I guess this is the missing link!
I'll try it today, thank you very much Simon!

Sébastien Jahan

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Simple problem with toolbox items extension.
« Reply #7 on: June 17, 2011, 10:52:46 pm »
That was actually the missing link!
The problem is solved, thank you very much ;)

Have a very good week-end!

SJ.