inspection toolwindow: use tool shortnames for suppression actions holder IDEA-156478

This commit is contained in:
Dmitry Batkovich
2016-05-24 11:38:04 +03:00
parent 9fec5653ef
commit c5cb3c466d
@@ -129,7 +129,7 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren
private InspectionTreeLoadingProgressAware myLoadingProgressPreview;
private final ExcludedInspectionTreeNodesManager myExcludedInspectionTreeNodesManager;
private final Set<Object> mySuppressedNodes = new HashSet<>();
private final ConcurrentMap<InspectionToolWrapper, Set<SuppressIntentionAction>> mySuppressActions = new ConcurrentHashMap<>();
private final ConcurrentMap<String, Set<SuppressIntentionAction>> mySuppressActions = new ConcurrentHashMap<>();
private final Object myTreeStructureUpdateLock = new Object();
@@ -621,8 +621,8 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren
@NotNull
public Set<SuppressIntentionAction> getSuppressActions(InspectionToolWrapper wrapper) {
return mySuppressActions.computeIfAbsent(wrapper, (w) -> {
final SuppressIntentionAction[] actions = InspectionManagerEx.getSuppressActions(w);
return mySuppressActions.computeIfAbsent(wrapper.getShortName(), (w) -> {
final SuppressIntentionAction[] actions = InspectionManagerEx.getSuppressActions(wrapper);
return actions == null ? Collections.emptySet() : ContainerUtil.newLinkedHashSet(actions);
});
}