}
else if (element.getText().equals(elementTypes[PORT])) {
if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(4).getText())) {
return false;
}
PortType port = (PortType)eObject;
if (port == null) {
port = (PortType)getEFactory().create(PortType.class);
serviceRef = (ServiceRefType)section.getSelectedObject();
serviceRef.getPort().add(port);
}
port.setPortName(textList.get(0).getText());
port.setProtocol(textList.get(1).getText());
port.setHost(textList.get(2).getText());
port.setPort(Integer.valueOf(textList.get(3).getText()));
port.setUri(textList.get(4).getText());
port.setCredentialsName(textList.get(5).getText());
}
else if (element.getText().equals(elementTypes[PORT_COMPLETION])) {
if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(4).getText()) ||
isEmpty(textList.get(6).getText())) {
return false;
}
PortCompletionType portComp = (PortCompletionType)eObject;
if (portComp == null) {
portComp = (PortCompletionType)getEFactory().create(PortCompletionType.class);
serviceRef = (ServiceRefType)section.getSelectedObject();
serviceRef.getServiceCompletion().getPortCompletion().add(portComp);
PortType port = (PortType)getEFactory().create(PortType.class);
portComp.setPort (port);
}
portComp.getPort().setPortName(textList.get(0).getText());
portComp.getPort().setProtocol(textList.get(1).getText());
portComp.getPort().setHost(textList.get(2).getText());