Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to associate an image to a stereotype?
How to associate an image to a stereotype? [message #476699] Tue, 04 December 2007 18:22 Go to next message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi folks,

I wondered how I can associate an image to a stereotype? In OMGs UML2 it
should be possible.

- -stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVZrqIYVWjMSpDwwRAi8fAJ0U3+MpvUCQYvS0dkNmHPcetOSJugCg 7bbG
e+CH5Y9FMF5PG4/cPK+NHUs=
=OB4j
-----END PGP SIGNATURE-----
Re: How to associate an image to a stereotype? [message #476703 is a reply to message #476699] Wed, 05 December 2007 14:40 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Stefan

uml::Stereotype has a method createImage() that returns a uml::Image. You
can then specify the format (BMP, EMF, GIF, JPG, PNG, SVG, WMF), and the
content. Stereotypes can have more than one image and the interpretation of
what these images are and how they should be displayed is a "variation"
point in the spec. Also, the combination of how images should be
displayed when multiple stereotypes with images are added to one element is
a variation point ( no order is described in the spec ).

Cheers
- James.


"SKuhn" <kuhn@oio.de> wrote in message
news:fj461r$9oc$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi folks,
>
> I wondered how I can associate an image to a stereotype? In OMGs UML2 it
> should be possible.
>
> - -stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHVZrqIYVWjMSpDwwRAi8fAJ0U3+MpvUCQYvS0dkNmHPcetOSJugCg 7bbG
> e+CH5Y9FMF5PG4/cPK+NHUs=
> =OB4j
> -----END PGP SIGNATURE-----
Re: How to associate an image to a stereotype? [message #476712 is a reply to message #476703] Thu, 06 December 2007 19:19 Go to previous messageGo to next message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi james,

I found a createIcon method in stereotype. I guess this is what you
mean. The drawback is that there must exist a generated version of that
stereotype (or eobject). Afaik, uml2 uses dynamic-emf for profiles to
create the stereotypes, so shouldn't there already be a way to specify
this in the profile uml2 model or in the annotated emf-model inside this?

- -stefan


James Bruck wrote:
> Hi Stefan
>
> uml::Stereotype has a method createImage() that returns a uml::Image. You
> can then specify the format (BMP, EMF, GIF, JPG, PNG, SVG, WMF), and the
> content. Stereotypes can have more than one image and the interpretation of
> what these images are and how they should be displayed is a "variation"
> point in the spec. Also, the combination of how images should be
> displayed when multiple stereotypes with images are added to one element is
> a variation point ( no order is described in the spec ).
>
> Cheers
> - James.
>
>
> "SKuhn" <kuhn@oio.de> wrote in message
> news:fj461r$9oc$1@build.eclipse.org...
> hi folks,
>
> I wondered how I can associate an image to a stereotype? In OMGs UML2 it
> should be possible.
>
> -stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWEsuIYVWjMSpDwwRAuGUAKDuhF7FjvvD5ZIz7KZXHaaxeUOl3QCf Ye6W
pXIHs1htURFCq5JgXMC0cKc=
=MNys
-----END PGP SIGNATURE-----
Re: How to associate an image to a stereotype? [message #476713 is a reply to message #476712] Thu, 06 December 2007 20:40 Go to previous messageGo to next message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Stefan,
Try this: open your profile .uml model using the example UML2 editor.
Right-click on a Stereotype and choose New Child > Icon > Image. Then in
the Properties tab, enter the path to your icon file. If deploying your
profile using a plugin, add the icons using a path relative your your
plugin.

For an example of this, look at the uml2.uml.resources plugin and see the
Ecore.profile.uml and its icons.

Dave

"SKuhn" <kuhn@oio.de> wrote in message
news:fj9i47$9p7$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi james,
>
> I found a createIcon method in stereotype. I guess this is what you
> mean. The drawback is that there must exist a generated version of that
> stereotype (or eobject). Afaik, uml2 uses dynamic-emf for profiles to
> create the stereotypes, so shouldn't there already be a way to specify
> this in the profile uml2 model or in the annotated emf-model inside this?
>
> - -stefan
Re: How to associate an image to a stereotype? [message #476719 is a reply to message #476713] Sat, 08 December 2007 15:55 Go to previous message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thanks dave,

I checked the properties but not the children.

Are the constraints which I can add there OCL constraints?

- -stefan

Dave Carlson wrote:
> Stefan,
> Try this: open your profile .uml model using the example UML2 editor.
> Right-click on a Stereotype and choose New Child > Icon > Image. Then in
> the Properties tab, enter the path to your icon file. If deploying your
> profile using a plugin, add the icons using a path relative your your
> plugin.
>
> For an example of this, look at the uml2.uml.resources plugin and see the
> Ecore.profile.uml and its icons.
>
> Dave
>
> "SKuhn" <kuhn@oio.de> wrote in message
> news:fj9i47$9p7$1@build.eclipse.org...
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> hi james,
>>
>> I found a createIcon method in stereotype. I guess this is what you
>> mean. The drawback is that there must exist a generated version of that
>> stereotype (or eobject). Afaik, uml2 uses dynamic-emf for profiles to
>> create the stereotypes, so shouldn't there already be a way to specify
>> this in the profile uml2 model or in the annotated emf-model inside this?
>>
>> - -stefan
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWr5cIYVWjMSpDwwRAnLsAJ4hw+l/3dTvAwZoKbeV273XrZ/GJwCg 3b/d
PDozyxu+FS3N6DXWL1AXdcA=
=l1gr
-----END PGP SIGNATURE-----
Re: How to associate an image to a stereotype? [message #625675 is a reply to message #476699] Wed, 05 December 2007 14:40 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Stefan

uml::Stereotype has a method createImage() that returns a uml::Image. You
can then specify the format (BMP, EMF, GIF, JPG, PNG, SVG, WMF), and the
content. Stereotypes can have more than one image and the interpretation of
what these images are and how they should be displayed is a "variation"
point in the spec. Also, the combination of how images should be
displayed when multiple stereotypes with images are added to one element is
a variation point ( no order is described in the spec ).

Cheers
- James.


"SKuhn" <kuhn@oio.de> wrote in message
news:fj461r$9oc$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi folks,
>
> I wondered how I can associate an image to a stereotype? In OMGs UML2 it
> should be possible.
>
> - -stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHVZrqIYVWjMSpDwwRAi8fAJ0U3+MpvUCQYvS0dkNmHPcetOSJugCg 7bbG
> e+CH5Y9FMF5PG4/cPK+NHUs=
> =OB4j
> -----END PGP SIGNATURE-----
Re: How to associate an image to a stereotype? [message #625684 is a reply to message #476703] Thu, 06 December 2007 19:19 Go to previous message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi james,

I found a createIcon method in stereotype. I guess this is what you
mean. The drawback is that there must exist a generated version of that
stereotype (or eobject). Afaik, uml2 uses dynamic-emf for profiles to
create the stereotypes, so shouldn't there already be a way to specify
this in the profile uml2 model or in the annotated emf-model inside this?

- -stefan


James Bruck wrote:
> Hi Stefan
>
> uml::Stereotype has a method createImage() that returns a uml::Image. You
> can then specify the format (BMP, EMF, GIF, JPG, PNG, SVG, WMF), and the
> content. Stereotypes can have more than one image and the interpretation of
> what these images are and how they should be displayed is a "variation"
> point in the spec. Also, the combination of how images should be
> displayed when multiple stereotypes with images are added to one element is
> a variation point ( no order is described in the spec ).
>
> Cheers
> - James.
>
>
> "SKuhn" <kuhn@oio.de> wrote in message
> news:fj461r$9oc$1@build.eclipse.org...
> hi folks,
>
> I wondered how I can associate an image to a stereotype? In OMGs UML2 it
> should be possible.
>
> -stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWEsuIYVWjMSpDwwRAuGUAKDuhF7FjvvD5ZIz7KZXHaaxeUOl3QCf Ye6W
pXIHs1htURFCq5JgXMC0cKc=
=MNys
-----END PGP SIGNATURE-----
Re: How to associate an image to a stereotype? [message #625685 is a reply to message #476712] Thu, 06 December 2007 20:40 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Stefan,
Try this: open your profile .uml model using the example UML2 editor.
Right-click on a Stereotype and choose New Child > Icon > Image. Then in
the Properties tab, enter the path to your icon file. If deploying your
profile using a plugin, add the icons using a path relative your your
plugin.

For an example of this, look at the uml2.uml.resources plugin and see the
Ecore.profile.uml and its icons.

Dave

"SKuhn" <kuhn@oio.de> wrote in message
news:fj9i47$9p7$1@build.eclipse.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi james,
>
> I found a createIcon method in stereotype. I guess this is what you
> mean. The drawback is that there must exist a generated version of that
> stereotype (or eobject). Afaik, uml2 uses dynamic-emf for profiles to
> create the stereotypes, so shouldn't there already be a way to specify
> this in the profile uml2 model or in the annotated emf-model inside this?
>
> - -stefan
Re: How to associate an image to a stereotype? [message #625691 is a reply to message #476713] Sat, 08 December 2007 15:55 Go to previous message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thanks dave,

I checked the properties but not the children.

Are the constraints which I can add there OCL constraints?

- -stefan

Dave Carlson wrote:
> Stefan,
> Try this: open your profile .uml model using the example UML2 editor.
> Right-click on a Stereotype and choose New Child > Icon > Image. Then in
> the Properties tab, enter the path to your icon file. If deploying your
> profile using a plugin, add the icons using a path relative your your
> plugin.
>
> For an example of this, look at the uml2.uml.resources plugin and see the
> Ecore.profile.uml and its icons.
>
> Dave
>
> "SKuhn" <kuhn@oio.de> wrote in message
> news:fj9i47$9p7$1@build.eclipse.org...
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> hi james,
>>
>> I found a createIcon method in stereotype. I guess this is what you
>> mean. The drawback is that there must exist a generated version of that
>> stereotype (or eobject). Afaik, uml2 uses dynamic-emf for profiles to
>> create the stereotypes, so shouldn't there already be a way to specify
>> this in the profile uml2 model or in the annotated emf-model inside this?
>>
>> - -stefan
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWr5cIYVWjMSpDwwRAnLsAJ4hw+l/3dTvAwZoKbeV273XrZ/GJwCg 3b/d
PDozyxu+FS3N6DXWL1AXdcA=
=l1gr
-----END PGP SIGNATURE-----
Previous Topic:using UML metaclasses within the extended metamodel
Next Topic:uml model with profile application
Goto Forum:
  


Current Time: Fri Mar 29 08:18:24 GMT 2024

Powered by FUDForum. Page generated in 0.03269 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top