inspection view: allow to invoke other suppression actions in when element is already suppressed in case of unused declaration inspection (IDEA-156821)

This commit is contained in:
Dmitry Batkovich
2016-07-12 16:18:12 +03:00
parent 191bc68923
commit 8787fba3de
3 changed files with 22 additions and 7 deletions
@@ -167,7 +167,15 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
@Override
public QuickFixAction[] getQuickFixes(@NotNull final RefEntity[] refElements, CommonProblemDescriptor[] allowedDescriptors) {
return myQuickFixActions;
boolean showFixes = false;
for (RefEntity element : refElements) {
if (!getIgnoredRefElements().contains(element) && element.isValid()) {
showFixes = true;
break;
}
}
return showFixes ? myQuickFixActions : QuickFixAction.EMPTY;
}
final QuickFixAction[] myQuickFixActions;