void (@NotNull final Consumer<? super Boolean> useNestingRulesOptionConsumer) { useNestingRulesOptionConsumer.consume(myUseNestingRulesCheckBox.isSelected()); if (myUseNestingRulesCheckBox.isSelected()) { final SortedSet<NestingRule> result = new TreeSet<>(RULE_COMPARATOR); for (CombinedNestingRule rule : myTable.getListTableModel().getItems()) { for (String childSuffix : StringUtil.split(rule.childSuffixes, ";")) { if (!StringUtil.isEmptyOrSpaces(childSuffix)) { result.add(new NestingRule(rule.parentSuffix, childSuffix.trim())); } } } ProjectViewFileNestingService.getInstance().setRules(new ArrayList<>(result)); } }