setChangedAndNotify();
}
}
public void modifyTypeAndNameForStepAt(final int stepIndex, final String name, final StepType stepType) {
final Step step = getBatch().getStep(stepIndex);
if (step != null) {
if (stepType == null) {
step.setOnFault(true);
JOptionPane.showMessageDialog(BossaNovaData.getSingleton().getApplication().getDialogHookComponent(),
"Error in Step configuration - unknown Step type or data " + step.getName());
} else {
// we apply changes only if it's a real changes. for example if the current step is
// a Traccer and user click on combobox step to select a Tracer (same actor) then
// there are nothing to change. But if he select an AttributeReader it's a real
// change and we apply it.
//
// cf bug 0018737
if ((!step.getName().equals(name)) || (step.getType() != stepType)) {
step.setOnFault(false);
step.setFlow(null);
step.setName(name);
step.setType(stepType);
// TODO REFACTOR that's weird
BossaNovaData.getSingleton().getApplication().getMainScreen().changeStep();
setCurrentBatchSaved(false);
setChangedAndNotify();