Search in sources :

Example 1 with AbstractDataMapTable

use of org.talend.designer.dbmap.model.table.AbstractDataMapTable in project tdi-studio-se by Talend.

the class MapperManager method removeSelectedOutputTable.

public void removeSelectedOutputTable() {
    OutputDataMapTableView currentSelectedDataMapTableView = uiManager.getCurrentSelectedOutputTableView();
    if (currentSelectedDataMapTableView != null) {
        OutputTable outputTable = (OutputTable) currentSelectedDataMapTableView.getDataMapTable();
        String tableTitle = ((AbstractDataMapTable) currentSelectedDataMapTableView.getDataMapTable()).getTitle();
        if (MessageDialog.openConfirm(currentSelectedDataMapTableView.getShell(), //$NON-NLS-1$
        Messages.getString("MapperManager.removeOutputTableTitle"), Messages.getString("MapperManager.removeOutputTableTitleMessage", new Object[] { tableTitle }))) {
            //$NON-NLS-1$
            IProcess process = mapperComponent.getProcess();
            uiManager.removeOutputTableView(currentSelectedDataMapTableView);
            uiManager.updateToolbarButtonsStates(Zone.OUTPUTS);
            process.removeUniqueConnectionName(outputTable.getUniqueName());
            uiManager.refreshSqlExpression();
        }
    }
}
Also used : AbstractDataMapTable(org.talend.designer.dbmap.model.table.AbstractDataMapTable) IProcess(org.talend.core.model.process.IProcess) OutputDataMapTableView(org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView) OutputTable(org.talend.designer.dbmap.model.table.OutputTable)

Aggregations

IProcess (org.talend.core.model.process.IProcess)1 AbstractDataMapTable (org.talend.designer.dbmap.model.table.AbstractDataMapTable)1 OutputTable (org.talend.designer.dbmap.model.table.OutputTable)1 OutputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView)1