}
@Override
public void modifyTestElement(TestElement sampler) {
super.configureTestElement(sampler);
SystemSampler systemSampler = (SystemSampler)sampler;
systemSampler.setCheckReturnCode(checkReturnCode.isSelected());
if(checkReturnCode.isSelected()) {
if(!StringUtils.isEmpty(desiredReturnCode.getText())) {
systemSampler.setExpectedReturnCode(Integer.parseInt(desiredReturnCode.getText()));
} else {
systemSampler.setExpectedReturnCode(SystemSampler.DEFAULT_RETURN_CODE);
}
} else {
systemSampler.setExpectedReturnCode(SystemSampler.DEFAULT_RETURN_CODE);
}
systemSampler.setCommand(command.getText());
systemSampler.setArguments((Arguments)argsPanel.createTestElement());
systemSampler.setEnvironmentVariables((Arguments)envPanel.createTestElement());
systemSampler.setDirectory(directory.getText());
systemSampler.setStdin(stdin.getFilename());
systemSampler.setStdout(stdout.getFilename());
systemSampler.setStderr(stderr.getFilename());
}