void (MyToggleTreeNode childNode, final CodeStyleSettings settings) { try { BooleanOptionKey key = (BooleanOptionKey)childNode.getKey(); childNode.setSelected(key.getValue(settings)); childNode.setEnabled(key.isEnabled()); } catch (IllegalArgumentException | IllegalAccessException e) { LOG.error(e); } }