438
442
context.nameGenerator().updateIndices(transition.underlyingTransition().model(), newName);
441
Command command = new MakeTransitionNewSharedCommand(context.activeModel(), newName, transition.underlyingTransition(), context.tabContent());
445
Command command = new MakeTransitionNewSharedCommand(context.activeModel(), newName, transition.underlyingTransition(), context.tabContent(), false);
442
446
context.undoManager().addEdit(command);
445
449
}catch(RequireException e){
446
451
context.undoManager().undo();
447
JOptionPane.showMessageDialog(this,"A transition or place with the specified name already exists, or the specified name is invalid.\n\nAcceptable names are defined by the regular expression:\n[a-zA-Z][_a-zA-Z0-9]*", "Error", JOptionPane.ERROR_MESSAGE);
452
int dialogResult = JOptionPane.showConfirmDialog(this, "A transition or place with the specified name already exists, or the specified name is invalid.\n\nAcceptable names for transitions are defined by the regular expression:\n[a-zA-Z][_a-zA-Z0-9]*\n\nNote that \"true\" and \"false\" are reserved keywords. \n\n Would you like to make the other transitions of the same name shared too?", "Error", JOptionPane.YES_NO_OPTION);
450
460
transition.setUrgent(urgentCheckBox.isSelected());