Thanks for the response to my previous question. I have a follow-up question. 

How do we specify the connection between ports. I used the following code:

 

FlowPort curPort = SysMLFactory.eINSTANCE.createFlowPort();

curPort.setName(in);

curPort.setDirection(FlowDirection.IN);         

curBlock.getOwnedAttributes().add(curPort);

 

//create connector            

Connector con = UMLFactory.eINSTANCE.createConnector();

con.setName("Con");

ConnectorEnd e = con.createEnd();

curBlock.getOwnedConnectors().add(con);

 

The ConnectorEnd does not appear to have attributes to specify the ports at the 
ends of the connector.

How do we specify that a connector connects Ports A and Port B using the 
TopCased Plugin? 

 

Again, some example code would be very helpful

 

 

thanks 
sudha 
UTRC 
860.610.7445 

From: Krishnamurthy, Sudha UTRC 
Sent: Thursday, April 08, 2010 4:47 PM
To: '[email protected]'
Subject: flow ports

 

Is there a way to create Sysml flow ports using the Topcased Eclipse Plugin 
(not the editor)?

 

I was only able to create UML Ports using the plugin:

 

Port curPort = curBlock.createOwnedPort(name, null);

 

There is a FlowPort class but it  does not seem to have a create function or 
constructor. I tried to typecast Port to FlowPort but that resulted in an 
error. An example code to create a flowport and set its type would be very 
helpful.

 

 

thanks 
sudha 

 
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users

Reply via email to