void (@NotNull PsiLocalVariable variable) { if (variable.isUnnamed() || PsiUtil.isIgnoredName(variable.getName())) return; if (UnusedSymbolUtil.isImplicitUsage(myProject, variable)) return; if (!myRefCountHolder.isReferenced(variable)) { message = JavaErrorBundle.message("local.variable.is.never.used", variable.getName()); quickFixes.add(variable instanceof PsiResourceVariable ? QuickFixFactory.getInstance().createRenameToIgnoredFix(variable, false) : QuickFixFactory.getInstance().createRemoveUnusedVariableFix(variable)); } else if (!myRefCountHolder.isReferencedForRead(variable) && !UnusedSymbolUtil.isImplicitRead(myProject, variable)) { message = JavaErrorBundle.message("local.variable.is.not.used.for.reading", variable.getName()); quickFixes.add(QuickFixFactory.getInstance().createRemoveUnusedVariableFix(variable)); } else if (!variable.hasInitializer() && !myRefCountHolder.isReferencedForWrite(variable) && !UnusedSymbolUtil.isImplicitWrite(myProject, variable)) { message = JavaErrorBundle.message("local.variable.is.not.assigned", variable.getName()); quickFixes.add(QuickFixFactory.getInstance().createAddVariableInitializerFix(variable)); } }