int occurrencesCount = usage.writeUsages.length + usage.readUsages.length;
String occurrencesString = RefactoringBundle.message("occurences.string", occurrencesCount);
String name = ctx.identifierToInline.getText();
String question = RefactoringBundle.message("inline.local.variable.prompt", name) + " " + occurrencesString;
RefactoringMessageDialog dialog = new RefactoringMessageDialog(
RefactoringBundle.message("inline.variable.title"),
question,
HelpID.INLINE_VARIABLE,
"OptionPane.questionIcon",
true,
ctx.project);
dialog.show();
if (!dialog.isOK()) {
StatusBar statusBar = WindowManager.getInstance().getStatusBar(ctx.project);
if (statusBar != null) {
statusBar.setInfo(RefactoringBundle.message("press.escape.to.remove.the.highlighting"));
}
return false;