private void getInfo(StepsMetricsMeta in) { stepname = wStepname.getText(); // return value int nrsteps = wFields.nrNonEmpty(); in.allocate(nrsteps); for (int i = 0; i < nrsteps; i++) { TableItem ti = wFields.getNonEmpty(i); StepMeta tm = transMeta.findStep(ti.getText(1)); // CHECKSTYLE:Indentation:OFF if (tm != null) { in.getStepName()[i] = tm.getName(); in.getStepCopyNr()[i] = "" + Const.toInt(ti.getText(2), 0); in.getStepRequired()[i] = in.getRequiredStepsCode(ti.getText(3)); } } in.setStepNameFieldName(wStepnameField.getText()); in.setStepIdFieldName(wStepidField.getText()); in.setStepLinesInputFieldName(wLinesinputField.getText()); in.setStepLinesOutputFieldName(wLinesoutputField.getText()); in.setStepLinesReadFieldName(wLinesreadField.getText()); in.setStepLinesWrittenFieldName(wLineswrittenField.getText()); in.setStepLinesUpdatedFieldName(wLinesupdatedField.getText()); in.setStepLinesErrorsFieldName(wLineserrorsField.getText()); in.setStepSecondsFieldName(wSecondsField.getText()); }
/** Copy information from the meta-data input to the dialog fields. */ public void getData() { Table table = wFields.table; if (input.getStepName().length > 0) { table.removeAll(); } for (int i = 0; i < input.getStepName().length; i++) { TableItem ti = new TableItem(table, SWT.NONE); ti.setText(0, "" + (i + 1)); if (input.getStepName()[i] != null) { ti.setText(1, input.getStepName()[i]); ti.setText(2, String.valueOf(Const.toInt(input.getStepCopyNr()[i], 0))); ti.setText(3, input.getRequiredStepsDesc(input.getStepRequired()[i])); } } wFields.removeEmptyRows(); wFields.setRowNums(); wFields.optWidth(true); if (input.getStepNameFieldName() != null) { wStepnameField.setText(input.getStepNameFieldName()); } if (input.getStepIdFieldName() != null) { wStepidField.setText(input.getStepIdFieldName()); } if (input.getStepLinesInputFieldName() != null) { wLinesinputField.setText(input.getStepLinesInputFieldName()); } if (input.getStepLinesOutputFieldName() != null) { wLinesoutputField.setText(input.getStepLinesOutputFieldName()); } if (input.getStepLinesReadFieldName() != null) { wLinesreadField.setText(input.getStepLinesReadFieldName()); } if (input.getStepLinesWrittenFieldName() != null) { wLineswrittenField.setText(input.getStepLinesWrittenFieldName()); } if (input.getStepLinesUpdatedFieldName() != null) { wLinesupdatedField.setText(input.getStepLinesUpdatedFieldName()); } if (input.getStepLinesErrorsFieldName() != null) { wLineserrorsField.setText(input.getStepLinesErrorsFieldName()); } if (input.getStepSecondsFieldName() != null) { wSecondsField.setText(input.getStepSecondsFieldName()); } wStepname.selectAll(); wStepname.setFocus(); }