void (@NotNull AnActionEvent e) { final DefaultTreeModel treeModel = (DefaultTreeModel)myTree.getModel(); final Object root = treeModel.getRoot(); if (!(root instanceof CheckedTreeNode)) return; if (!myShowSelectedRowsOnly) { myTree.setNodeState((CheckedTreeNode)root, false); } else { myShowSelectedRowsOnly = false; reloadTree(); myTree.setNodeState((CheckedTreeNode)root, false); myShowSelectedRowsOnly = true; reloadTree(); } }