void (@NotNull CheckedTreeNode root) { if (myCurrentUiState.isAllFileTypesSelected()) { root.setChecked(true); return; } root.setChecked(false); Enumeration<TreeNode> fileTypesEnum = root.children(); while (fileTypesEnum.hasMoreElements()) { CheckedTreeNode node = (CheckedTreeNode)fileTypesEnum.nextElement(); FileType fileType = (FileType)node.getUserObject(); node.setChecked(myCurrentUiState.isFileTypeSelected(fileType)); } }