hide fix with possible dialogs in batch mode

This commit is contained in:
Anna Kozlova
2014-03-28 20:36:02 +01:00
parent 7751598396
commit 0cfb14eeb3
@@ -90,11 +90,13 @@ public class DefUseInspectionBase extends BaseJavaBatchLocalInspectionTool {
}
else {
if (REPORT_REDUNDANT_INITIALIZER) {
List<LocalQuickFix> fixes = ContainerUtil.createMaybeSingletonList(isOnTheFly ? createRemoveInitializerFix() : null);
holder.registerProblem(psiVariable.getInitializer(),
InspectionsBundle.message("inspection.unused.assignment.problem.descriptor2",
"<code>" + psiVariable.getName() + "</code>", "<code>#ref</code> #loc"),
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
createRemoveInitializerFix());
fixes.toArray(new LocalQuickFix[fixes.size()])
);
}
}
}