@Override protected boolean performLeavingAction(WizardStepDirection direction) { if (direction == WizardStepDirection.FINISH) { try { if (state.getTranslator() != null) { state.getTranslator().close(); } } catch (OperatorException e) { ImportWizardUtils.showErrorMessage( state.getDataResultSetFactory().getResourceName(), e.toString(), e); } // use settings edited by user even if he never pressed Enter or otherwise confirmed his // changes for (int i = 0; i < previewTable.getColumnCount(); i++) { EditableTableHeaderColumn col = (EditableTableHeaderColumn) previewTable.getColumnModel().getColumn(i); if (col.getHeaderEditor() instanceof MetaDataTableHeaderCellEditor) { MetaDataTableHeaderCellEditor editor = (MetaDataTableHeaderCellEditor) col.getHeaderEditor(); editor.updateColumnMetaData(); } } } return true; }
@Override public void finish() { super.finish(); if (reader != null) { // we are configuring an operator state.getTranslationConfiguration().setParameters(reader); state.getDataResultSetFactory().setParameters(reader); getState().getDataResultSetFactory().close(); } }