diag for EA-51660 - IAE: SuppressManagerImpl.createSuppressActions

This commit is contained in:
Alexey Kudravtsev
2013-12-10 15:19:53 +04:00
parent f3da68ddd3
commit 601c3d4d09
@@ -34,7 +34,12 @@ import org.jetbrains.annotations.NotNull;
public abstract class BaseJavaLocalInspectionTool extends AbstractBaseJavaLocalInspectionTool implements CustomSuppressableInspectionTool {
@Override
public SuppressIntentionAction[] getSuppressActions(final PsiElement element) {
return SuppressManager.getInstance().createSuppressActions(HighlightDisplayKey.find(getShortName()));
String shortName = getShortName();
HighlightDisplayKey key = HighlightDisplayKey.find(shortName);
if (key == null) {
throw new AssertionError("HighlightDisplayKey.find(" + shortName + ") is null. Inspection: "+getClass());
}
return SuppressManager.getInstance().createSuppressActions(key);
}
@Override