When I look at a Logical Component properties I can find all the Contained Component Ports.
When I look at a Component Exchange properties I can find the Source Port but not the associated Component…
Is there any way to get the Logical Component name associated to a Component Port?
I’m developping a java plugin and I would like to find the component name by this way: Component Exchange -> Source Port -> associated Component name
Thanks a lot for your help!
Finally I’ve found myself a solution. Maybe not the best but it works (if someone has a better one, let me know)
I get the Logical Component name by using the eContainer() method of the Logical Component Exchange source Port (getSourcePort() method). The eContainer returns the logical component as an eObject which I cast into a LogicalComponent to use the getName method.
I faced the same issue than you, and have an other problem.
Was it possible for you to directly use the eContainer() method on the Logical Port ?
When I tried that piece of code :
PhysicalPort sourcePP = Link.getSourcePhysicalPort();
PhysicalComponent targetComp = (PhysicalComponent) sourcePP.eContainer();
it raises an error, " The method eContainer() is undefined for the type PhysicalPort "
What was your piece of code for obtaining the Logical Component port ?