final String macroName = macroNameText.getText().trim();
if (macroName.isEmpty()) {
setErrorMessage("The macro name cannot be empty");
return;
}
final IHttpMacro macroStored = macroModel.getMacroByName(macroName);
if (macroStored != null && macroStored != macro) {
setErrorMessage("A macro by that name already exists");
return;
}