[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
[news.eclipse.modeling.mdt.uml2.uml] Re: UML Interactions via the API
From
:
paul.t.smith@xxxxxxxxx
(Paul Smith)
Date
: Thu, 21 Dec 2006 04:56:48 +0000 (UTC)
Newsgroups
:
eclipse.modeling.mdt.uml2.uml
Organization
: Eclipse
User-agent
: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Ken,
you were right, it has been discussed earlier but no code example. Just in case anyone else needs to know how, the following code snippet is how you do it off the version 1.03 API (Using IBM RSA6 hence the old API)
Object collaborationElement = iterator.next();
if(collaborationElement instanceof Interaction) {
Interaction interaction = (Interaction) collaborationElement;
EList fragments = interaction.getFragments();
for (Iterator fragmentIterator = fragments.iterator(); fragmentIterator.hasNext();) {
Object fragment = fragmentIterator.next();
if(fragment instanceof ExecutionOccurrence) {
ExecutionOccurrence eo = (ExecutionOccurrence) fragment;
} else if(fragment instanceof EventOccurrence) {
EventOccurrence eo = (EventOccurrence) fragment;
if(eo.getSendMessage() != null) {
logger.trace("Message " + eo.getSendMessage().getName());
}
}
}
Follow-Ups
:
[news.eclipse.modeling.mdt.uml2.uml] Re: UML Interactions via the API
From:
James Bruck
References
:
[news.eclipse.modeling.mdt.uml2.uml] UML Interactions via the API
From:
Paul Smith
[news.eclipse.modeling.mdt.uml2.uml] Re: UML Interactions via the API
From:
Kenn Hussey
Prev by Date:
[news.eclipse.modeling.mdt.uml2.uml] Re: EnumerationLiteral is an InstanceSpecification, so ...
Next by Date:
[news.eclipse.modeling.mdt.uml2.uml] EnumerationLiteral is an InstanceSpecification, so ...
Previous by thread:
[news.eclipse.modeling.mdt.uml2.uml] Re: UML Interactions via the API
Next by thread:
[news.eclipse.modeling.mdt.uml2.uml] Re: UML Interactions via the API
Index(es):
Date
Thread