void setProcedureName(String newName) {
if (newName != null && newName.trim().length() == 0) {
newName = null;
}
Procedure procedure = eventController.getCurrentProcedure();
if (procedure == null || Util.nullSafeEquals(newName, procedure.getName())) {
return;
}
if (newName == null) {
throw new ValidationException("Procedure name is required.");
}
else if (procedure.getDataMap().getProcedure(newName) == null) {
// completely new name, set new name for entity
ProcedureEvent e = new ProcedureEvent(this, procedure, procedure.getName());
ProjectUtil.setProcedureName(procedure.getDataMap(), procedure, newName);
eventController.fireProcedureEvent(e);
}
else {
// there is an entity with the same name
throw new ValidationException("There is another procedure with name '"