Book a Demo

Author Topic: Stereotypes, Profiles & graphics  (Read 5990 times)

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Stereotypes, Profiles & graphics
« on: February 21, 2007, 12:02:48 am »
HI,
I'm writing a MDA UML profile (see http://wcmf.sourceforge.net/) with stereotypes wich have special images (EMF). the stereotype should be displayed like a clientpage stereatype class:

  • icon on the right
  • Property list visible


What happens is that I get a big image with only the name visible.
I have found a 3 year answer on this forum that states this is not possible.
Do we have any new solution for this?
???
thanks, Giuseppe
Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python

thomaskilian

  • Guest
Re: Stereotypes, Profiles & graphics
« Reply #1 on: February 21, 2007, 03:09:08 am »
Not sre whether this will help, but look for Shape Script in the help and here on the forum.

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Re: Stereotypes, Profiles & graphics
« Reply #2 on: February 21, 2007, 05:02:59 am »
Thanks for your answer.
Shape script permit to create stereotypes with the icon on the top right but still I cannot display class properties and methods.

Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Stereotypes, Profiles & graphics
« Reply #3 on: February 21, 2007, 08:02:00 am »
There's some work involved, but you should be able to do this. Take a close look at the shape script examples in the EA User Guide. One of them creates compartments and writes information therein.
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Stereotypes, Profiles & graphics
« Reply #4 on: February 21, 2007, 03:56:05 pm »
Quote
Shape script permit to create stereotypes with the icon on the top right but still I cannot display class properties and methods.

 

What does your shape script look like? I'm expecting something like this:

decoration myShape
{
orientation = "NE";
image("myImage",0,0,100,100);
}

That will draw the element as normal and super-impose the image in the north east corner.
The Sparx Team
[email protected]

Giu Platania

  • EA User
  • **
  • Posts: 88
  • Karma: +4/-0
  • As Above so Below
    • View Profile
    • Linkedin
Re: Stereotypes, Profiles & graphics
« Reply #5 on: February 22, 2007, 12:35:28 am »
Thanks you KP!
this is exactly what i have looked for!
A shame that this is not documented.
Now, can I export the shape in a UML profile?
AFIK the system works only if you first import an image on the image manager, right?
so no chance to export as profile...
any clue?
Giuseppe Platania
Enterprise Architect
Door Business Consulting
+++
"As above so below, to accomplish the miracles of the One Thing" - Trismegistus
===
The above content reflects my own opinion and is not endorsed by Monthy Python
***
The above is NOT a reference to Monty Python

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Stereotypes, Profiles & graphics
« Reply #6 on: February 22, 2007, 03:17:00 am »
If you added the shape script to a metamodel as described in the documentation for metamodels - not the stereotypes - then the script will be exported with the profile.

I do not know if you need to take extra steps for the image. My guess is that either you don't need to do anything, or that you need to follow the same procedure you would if the profile used special images instead of shape scripts or rectangle notation. Either way, it should be possible.

Try reading the appropriate docs, and if it does not work report this as to Sparx via the Support page. Use the link at the top of the forum page, or from the EA main menu use Help | On-line Resources | Bug Report Page (or Request-a-Feature depending on exactly what happens).
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Stereotypes, Profiles & graphics
« Reply #7 on: February 22, 2007, 01:36:51 pm »
To save a shape script in a profile, give the <<stereotype>> class an attribute named "_image" and click the "..." button next to the "Initial Value" field to open the shape script editor.

If the shape script references an image from your model, you will need to use "Tools > Export Reference Data > Model Images" to export images then import them before loading your profile in the target model.
The Sparx Team
[email protected]