use of org.talend.designer.core.ui.dialog.mergeorder.MergeOrderDialog in project tdi-studio-se by Talend.
the class ModifyMergeOrderAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
super.run();
MergeOrderDialog dialog = new MergeOrderDialog(this.getWorkbenchPart().getSite().getShell(), mergeComponent);
if (dialog.open() == MergeOrderDialog.OK) {
for (IConnection connection : mergeComponent.getIncomingConnections()) {
if (connection.getSource().isStart() && (connection.getSource().getOutgoingConnections(EConnectionType.ON_SUBJOB_ERROR).size() != 0 || connection.getSource().getOutgoingConnections(EConnectionType.ON_SUBJOB_OK).size() != 0)) {
//$NON-NLS-1$
MessageDialog.openError(//$NON-NLS-1$
new Shell(), //$NON-NLS-1$
Messages.getString("ModifyMergeOrderAction.ERROE"), //$NON-NLS-1$
Messages.getString("ModifyMergeOrderAction.ConnectionModifyError"));
return;
}
if (connection.getSource().getIncomingConnections(EConnectionType.ON_SUBJOB_ERROR).size() != 0 || connection.getSource().getIncomingConnections(EConnectionType.ON_SUBJOB_OK).size() != 0) {
//$NON-NLS-1$
MessageDialog.openError(//$NON-NLS-1$
new Shell(), //$NON-NLS-1$
Messages.getString("ModifyMergeOrderAction.ERROE"), //$NON-NLS-1$
Messages.getString("ModifyMergeOrderAction.ConnectionModifyError"));
return;
}
}
ChangeMergeOrderCommand cmd = new ChangeMergeOrderCommand(mergeComponent, dialog.getConnectionList());
execute(cmd);
}
}
Aggregations