I don't have much time right now, so just a short answer:
Yes, you are right about the EditParts -- they do not inherit from a
common super class. Therefore, my suggesstion is that ypu create a
separate utility class for the priority extension of channel editparts.
I do not exactly remember how I implemented it for the FIFO channel, but
my suggestion for now would be that you averride in all relevant
editparts the mathod handleNotification() or something similar (just
look up the methods in the editparts). This method is called whenever a
property of the underlying model is changed. In this method you can call
a static method in your new utility class which updates the figure based
on the domain model. So this method needs access to the channel itself
and the figure. Besides the "handle.." method, you also need to override
a method for the figure creation, I guess something like
createConnectionFigure. This is necessary because in the beginning no
notification is triggered.
Anyway, my suggestion is that you put all new code in a separate class,
and override only the mentioned two methods in the editpart, which
should then invoke code from the new utility class. Please take the
overridden methods in the editparts with @generated NOT, and just write
one or two lines of comments in the utility class. If you have any
further questions, let me know.
Cheers,
Christian
Am 04.10.2011 14:27, schrieb Behnaz Changizi: