From c3aabac907df311f279ad5bbcef4399972c0c8ac Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Sat, 7 Dec 2013 13:55:50 +0100 Subject: [PATCH] skip excluded nodes during prev/next occurrence navigation --- .../com/intellij/codeInspection/ui/InspectionResultsView.java | 3 +++ .../usageView/src/com/intellij/usages/impl/UsageViewImpl.java | 1 + 2 files changed, 4 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java index 0bc7fec15f33..c76f4f61accf 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -218,6 +218,9 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren @Override @Nullable protected Navigatable createDescriptorForNode(DefaultMutableTreeNode node) { + if (node instanceof InspectionTreeNode && ((InspectionTreeNode)node).isResolved()) { + return null; + } if (node instanceof RefElementNode) { final RefElementNode refNode = (RefElementNode)node; if (refNode.hasDescriptorsUnder()) return null; diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index 7c44ea8d5921..ac4d3cedce9a 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -1377,6 +1377,7 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra @Override protected Navigatable createDescriptorForNode(DefaultMutableTreeNode node) { if (node.getChildCount() > 0) return null; + if (node instanceof Node && ((Node)node).isExcluded()) return null; return getNavigatableForNode(node); }