use of org.talend.designer.fileoutputxml.ui.FOXMultiSchemaUI in project tdi-studio-se by Talend.
the class FOXMain method createUI.
/**
* create UI".
*
* @param parent
* @return
*/
public void createUI(Composite parent) {
if (!connector.istWriteXMLField() && !connector.istMDMOutput()) {
IConnection inConn = null;
List<? extends IConnection> incomeConnections = connector.getIncomingConnections();
if (connector.istFileOutputMSXML() && incomeConnections.size() < 1) {
MessageBox message = new MessageBox(parent.getShell(), SWT.APPLICATION_MODAL | SWT.OK);
//$NON-NLS-1$
message.setText(Messages.getString("FOXMain.inputlinkError"));
//$NON-NLS-1$
message.setMessage(Messages.getString("FOXMain.noInputLink"));
if (message.open() == SWT.OK) {
((Shell) parent).close();
return;
}
for (IConnection conn : incomeConnections) {
if ((conn.getLineStyle().equals(EConnectionType.FLOW_MAIN)) || (conn.getLineStyle().equals(EConnectionType.FLOW_REF))) {
inConn = conn;
break;
}
}
if (inConn != null) {
if (!inConn.getMetadataTable().sameMetadataAs(connector.getMetadataList().get(0))) {
MessageBox messageBox = new MessageBox(parent.getShell(), SWT.APPLICATION_MODAL | SWT.OK);
//$NON-NLS-1$
messageBox.setText(Messages.getString("FOXMain.0"));
//$NON-NLS-1$
messageBox.setMessage(Messages.getString("FOXMain.1"));
if (messageBox.open() == SWT.OK) {
((Shell) parent).close();
return;
}
}
}
}
}
// add by wzhang. for component tFileOutputMSXML
if (connector.istFileOutputMSXML()) {
generatorUI = new FOXMultiSchemaUI(parent, foxManager);
} else {
generatorUI = new FOXUI(parent, foxManager);
}
generatorUI.init();
}
Aggregations