void () { final String name = myNameField.getText().trim(); if (!LanguageNamesValidation.isIdentifier(myElement.getLanguage(), name, myProject)) { CommonRefactoringUtil.showErrorMessage(InvertBooleanHandler.getRefactoringName(), RefactoringBundle.message("please.enter.a.valid.name.for.inverted.element", UsageViewUtil.getType(myElement)), getHelpId(), myProject); return; } invokeRefactoring(new InvertBooleanProcessor(myElement, name)); }