inspection toolwindow: do not change selection when nodes was included/excluded ...
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Thu, 26 May 2016 15:01:16 +0000 (18:01 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Thu, 26 May 2016 17:43:20 +0000 (20:43 +0300)
platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java

index 9db58726e5300efeb95ed39be1f14bfeb04fdbfa..b13a34aeec38f76b14e016eb370ea63100892013 100644 (file)
@@ -164,18 +164,11 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren
       public void excludeNode(@NotNull InspectionTreeNode node) {
         node.excludeElement(myExcludedInspectionTreeNodesManager);
         if (myGlobalInspectionContext.getUIOptions().FILTER_RESOLVED_ITEMS) {
-          final TreePath[] paths = myTree.getSelectionPaths();
-          LOG.assertTrue(paths != null);
           InspectionTreeNode parent = (InspectionTreeNode)node.getParent();
-          InspectionTreeNode toSelect = null;
           synchronized (myTreeStructureUpdateLock) {
-            if (paths.length == 1) {
-              toSelect = (InspectionTreeNode)node.getNextNode();
-            }
             parent.remove(node);
             ((DefaultTreeModel)myTree.getModel()).reload(parent);
           }
-          TreeUtil.selectInTree(toSelect == null ? parent : toSelect, true, myTree);
         }
       }