public void removeSelectedProblems() {
    ThreadingAssertions.assertEventDispatchThread();
    if (!getContext().getUIOptions().FILTER_RESOLVED_ITEMS) return;
    TreePath[] selected = getSelectionPaths();
    if (selected == null) return;
    Set<InspectionTreeNode> processedNodes = new HashSet<>();
    List<InspectionTreeNode> toRemove = new ArrayList<>();
    for (TreePath path : selected) {
      Object[] nodePath = path.getPath();

      // ignore root
      for (int i = 1; i < nodePath.length; i++) {
        InspectionTreeNode node = (InspectionTreeNode) nodePath[i];
        if (!processedNodes.add(node)) continue;

        if (shouldDelete(node)) {
          toRemove.add(node);
          break;
        }
      }
    }

    if (toRemove.isEmpty()) return;

    TreePath pathToSelect = null;
    if (selected.length == 1) {
      final InspectionTreeNode nextNode = myModel
        .traverseFrom((InspectionTreeNode) selected[0].getLastPathComponent(), true)
        .filter(n -> !shouldDelete(n)).first();
      if (nextNode != null) pathToSelect = TreeUtil.getPathFromRoot(nextNode);
    } else {
      TreePath commonAliveAncestorPath = TreePathUtil.findCommonAncestor(selected);
      while (commonAliveAncestorPath != null && shouldDelete((InspectionTreeNode) commonAliveAncestorPath.getLastPathComponent())) {
        commonAliveAncestorPath = commonAliveAncestorPath.getParentPath();
      }
      if (commonAliveAncestorPath != null) pathToSelect = commonAliveAncestorPath;
    }

    for (InspectionTreeNode node : toRemove) {
      InspectionTreeNode parent = node.getParent();
      if (parent != null) {
        myModel.remove(node);
      }
    }

    TreeUtil.selectPath(this, pathToSelect);

    revalidate();
    repaint();
  }
public void removeSelectedProblems()