Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Programmatically create port
Programmatically create port [message #603092] Wed, 21 March 2007 17:05
Paolo is currently offline PaoloFriend
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
Previous Topic:Questions in UML Extension mechanisms
Next Topic:[Announce] MDT UML2 2.1.0 I200703221526 is available
Goto Forum:
  


Current Time: Thu Apr 25 19:26:02 GMT 2024

Powered by FUDForum. Page generated in 0.02687 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top