void () { MapDataContext context = createRenameDataContext(myProjectPom, "new name"); RenameHandler handler = RenameHandlerRegistry.getInstance().getRenameHandler(context); if (handler == null) return; try { invokeRename(context, handler); } catch (CommonRefactoringUtil.RefactoringErrorHintException e) { if (!e.getMessage().startsWith("Cannot perform refactoring.")) { throw e; } } }