Search in sources :

Example 1 with OutputAddDialog

use of org.talend.designer.mapper.ui.dialog.OutputAddDialog in project tdi-studio-se by Talend.

the class UIManager method openNewOutputCreationDialog.

/**
     * DOC amaumont Comment method "openAddNewOutputDialog".
     * 
     * return tableName--joinTableName if creating join table
     */
public String openNewOutputCreationDialog() {
    final IProcess process = mapperManager.getAbstractMapComponent().getProcess();
    //$NON-NLS-1$
    String outputName = process.generateUniqueConnectionName("out");
    //        InputDialog id = new InputDialog(getMapperContainer().getShell(), Messages.getString("UIManager.addNewOutputTable"), //$NON-NLS-1$
    //                Messages.getString("UIManager.typeTableName"), outputName, new IInputValidator() { //$NON-NLS-1$
    //
    // public String isValid(String newText) {
    // if (!process.checkValidConnectionName(newText)) {
    //                            return Messages.getString("UIManager.tableNameIsNotValid"); //$NON-NLS-1$
    // }
    // return null;
    // }
    //
    // });
    // int response = id.open();
    // if (response == InputDialog.OK) {
    // return id.getValue();
    // }
    OutputAddDialog dialog = new OutputAddDialog(getShell(), mapperManager, outputName);
    if (Window.OK == dialog.open()) {
        String tableName = "";
        tableName = dialog.getTableName();
        if (dialog.isCreatingJoinTable()) {
            tableName = tableName + NAME_SEPARATOR + dialog.getJoinTableName();
        }
        return tableName;
    }
    return null;
}
Also used : OutputAddDialog(org.talend.designer.mapper.ui.dialog.OutputAddDialog) IProcess(org.talend.core.model.process.IProcess)

Aggregations

IProcess (org.talend.core.model.process.IProcess)1 OutputAddDialog (org.talend.designer.mapper.ui.dialog.OutputAddDialog)1