}
private void addPortAttachments(IAcmePort acmePort, Port port,
IAcmeSystem system) {
for (IAcmeAttachment att : system.getAttachments(acmePort)) {
IAcmeRole acmeRole = att.getRole();
Role role = new Role();
port.getRoles().add(role);
role.setPort(port);
if (acmeRole.getDeclaredTypes().size() > 0) {
IAcmeElementTypeRef<IAcmeRoleType> type = acmeRole
.getDeclaredTypes().iterator().next();
role.setStyleType(type.getReferencedName());
}
addProperties(role, acmeRole.getProperties());
IAcmeConnector acmeConn = (IAcmeConnector) acmeRole.getParent();
Connector conn = conf
.getConnectorByName(getQualifiedName(acmeConn));
role.setConnector(conn);
conn.getRoles().add(role);
}