1

I would like to know the possibility of having a dynamic representation to a container in Sirius editor.

Let me explain the problem bit elaborately. I want to model a vehicle in Sirius editor. I consider vehicle as container and wheel as node. I have created the ecore models. As per the default behavior of Sirius editor (.odesign), container (vehicle) is shown in the editor as "rectangle box". But I would like to have custom representation as below.

enter image description here enter image description here

In this image square and triangles are wheels. These are sample images. There could be n number of such representations to be supported.

If I would support only one of such representation, I can simply accomplish it using PNG/SVG images. But based on number of wheels defined by the user, the vehicle representation should be changed dynamically at run time. User can add wheels (nodes) to vehicle (container) from the palette view. upon adding wheels, I need some handler mechanism to control the representation of vehicle (container).

Is it possible in Sirius? If so, please shed some light.

Sanjit Kumar Mishra
  • 1,153
  • 13
  • 32

1 Answers1

0

It is possible to get the two shapes considering the car as a container and the wheels as border nodes. You can use conditional style expressions for modifying the image depending on the number of the contained wheels. But the problem is to make the wheels appear in the positions that you want.

sali333
  • 125
  • 4
  • 15