I don't think that overriding methods will help you, since the shape ecore model is fixed and you will not be able to store your own attributes.
We do it by having our own class hierarchy of "SmartShapes", mapping those to Graphiti Shapes and storing data in properties.
hmkay, i thought of that, too. In a feature, for example, you get the pictogramElement by context.getPictogramElement(). Now you would have to generate the smart shape by mapping the properties to the attributes of the smart shape...
I don't know, if i like this solution, it just generates overhead by mapping smart shape <--> shape. But it might be necessary, if shapes get to complex.
Michael Wenz Messages: 1737 Registered: July 2009 Location: Walldorf, Germany
In the end this turns out to be a matter of identifying shapes somehow. I
see 2 possibilities to do that:
1) Using the linking mechanism
2) Using properties as Andreas pointed out
To ease both ways a proven way to ge is introducing service methods that
retrieve the required object from another one.