Programmatically create port [message #603092] |
Wed, 21 March 2007 17:05 |
Paolo Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hi everyone.
I appreciated so much the Getting Started article about UML2, but I
actually didn't understand how to create a port.
(e.g.) I've got a class and an interface: I'd like to connect themselves
with connection and ports, I didn't understand the documentation so I
ask your help.
I have Class1 with portA and Class2 with portB, and I want to create a
connection between port 1 and 2. What I understood is I need to write:
org.eclipse.uml2.uml.Port portA=UMLFactory.eINSTANCE.createPort();
org.eclipse.uml2.uml.Port portB=UMLFactory.eINSTANCE.createPort();
In this way I've got two "dangling" ports (?), how can I associate these
ports to their respective classes and create the connection?
I'm a bit confused..
Thanks to everyone,
Paolo
|
|
|
Powered by
FUDForum. Page generated in 0.02687 seconds