I have a model where one model object is represented multiple times in the displayed graph. Consider the following model:
I want to visualize this such that the selected Partition is in the center:
So my model of a Partition maps to multiple figures. An ordinary Partition is painted twice (one time on the left and one time on the right) and the selected Partition three times.
How to implement this in GEF? Should I create one EditPart per Partition and let it return a IFigure for all graphical representations? Or should every instance that is drawn to the screen have it's own EditPart? Or is it benificial to create an extra model where one Partition is represented through multiple model instances?
I suggest to create a different model which contains all the visualizazion data: in this way you could link an element of the data model to multiple instance of eleemnts of the visualization model and solve your problem in a simple and elegant way. Moreover you don't "pollute" the data model with all the data needed for the visualization, i.e. the coordinate of the elements in the diagram.
Saluti