private int promptUser(final CheckStylePlugin plugin,
final int errorCount,
final CommitExecutor executor) {
String commitButtonText;
if (executor != null) {
commitButtonText = executor.getActionText();
} else {
commitButtonText = checkinPanel.getCommitActionName();
}
if (commitButtonText.endsWith("...")) {
commitButtonText = commitButtonText.substring(0, commitButtonText.length() - 3);
}
final String[] buttons = new String[]{
message("handler.before.checkin.error.review"),
commitButtonText,
CommonBundle.getCancelButtonText()};
return Messages.showDialog(plugin.getProject(), message("handler.before.checkin.error.text", errorCount),
message("handler.before.checkin.error.title"),
buttons, 0, UIUtil.getWarningIcon());
}