[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.modeling.mdt.uml2.uml] UML Interactions via the API
|
I'm currently writing some code to interrogate a model that contains an
Interaction. That interaction has a series of EventOccurrence and Message
elements. It's basically a sequence diagram and I'm trying to generate
code from the model that implements the flow of excecution of the sequence
diagram.
I'm using the following code to get the Messages of the interaction:
List messages = interaction.getMessages();
for (Iterator messageIterator = messages.iterator(); messageIterator
.hasNext();) {
Message message = (Message) messageIterator.next();
logger.trace("Message name: " + message.getName());
logger.trace("Message sort: " + message.getMessageSort().getName());
This all works but I cannot seem work out a way of determining the
sequence of those messages. I tried looking at the GeneralOrderings of the
EventOccurrence but the lists are always empty. Does anyone have a way of
doing this?