Book a Demo

Author Topic: Stereotype background default color and instances  (Read 4835 times)

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Stereotype background default color and instances
« on: October 12, 2012, 03:52:55 am »
Believe this is a bug.

When converting a node to an instance, the instance should pick up the attributes of the node, including color.

I have a node stereotype defined in a profile for "Router" where I have set its default appearance for its background color to blue. When I create a Router on a diagram from the Router element in my toolbox the background is correctly filled with the default blue background. When I change the element to be an instance, the instance's background reverts back to the EA default tan color. It should still be blue.  

This works in other areas such as dragging the Router stereotype from the project browser. If you select creating an instance or link, the resulting background color is the correct default of blue.

Agree?    

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Stereotype background default color and instan
« Reply #1 on: October 12, 2012, 08:46:11 am »
So your stereotype only extends Class? Make it extend Object as well.
The Sparx Team
[email protected]

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Stereotype background default color and instan
« Reply #2 on: October 13, 2012, 12:44:14 am »
How do I extend object as well as class?  
Setting either of these options seem to have an effect:
- Objects/Extend Complexity
- Diagram/Behavior/Instance has Classifier style
and I do not see any special attribute that I can apply to the stereotype.



"Diagram/Behavior/Instance has Classifier style" raises another question...if I have Instance has Classifier style set, I would also exect that if I change the instance classfier, that the instance would reflect the background color of its classifier's default, but the instance appears to remain the same color as it was.

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Stereotype background default color and instan
« Reply #3 on: October 13, 2012, 12:58:04 am »
KP:
Currently in my MDG profile, the stereotype extends to a Node metaclass.  Are you saying that I need to add an Object metaclass (or maybe an ObjectNode metaclass) and extend the stereotype to that also?
Karl

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype background default color and instan
« Reply #4 on: October 13, 2012, 01:48:24 am »
Just create another metaclass and draw an <<extends>> from your stereotype. You can do that with as many metaclasses as you wish.

q.
« Last Edit: October 13, 2012, 01:48:47 am by qwerty »