Book a Demo

Author Topic: Customize element in project browser by stereotype  (Read 5686 times)

aaron1993

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Customize element in project browser by stereotype
« on: July 29, 2014, 02:10:14 am »
Pretty simple question:

Is there a simple way of changing the element icon displayed in the project browser based on the stereotype it has been given?

Cheers,
Aaron

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Customize element in project browser by stereo
« Reply #1 on: July 29, 2014, 02:13:04 am »
Simple answer: no.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Customize element in project browser by stereo
« Reply #2 on: July 29, 2014, 08:46:51 am »
But is there a complicated way? Yes!

You need to define your stereotype in a UML profile, and give it an attribute named icon with initial value set to the path/name of a 16x16 bitmap file on your file system. (If you search the help file for _defaultAttributeType, it's described on the row below that)
The Sparx Team
[email protected]

aaron1993

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Customize element in project browser by stereo
« Reply #3 on: July 31, 2014, 04:39:00 am »
Thanks KP, that works.