@Override
  public void applyEditorTo(@NotNull Settings settings) throws ConfigurationException {
    super.applyEditorTo(settings);
    final var fragments = getAllFragments().toList();

    fragments.forEach(f -> f.validate(settings));
    List<FragmentedSettings.Option> options = fragments.stream().filter(fragment -> (isDefaultSettings() || fragment.isCanBeHidden()) &&
                                                                                   fragment.isSelected() != fragment.isInitiallyVisible(settings))
      .map(fragment -> new FragmentedSettings.Option(fragment.getId(), fragment.isSelected())).collect(Collectors.toList());
    if (!isDefaultSettings()) {
      for (FragmentedSettings.Option option : settings.getSelectedOptions()) {
        if (!ContainerUtil.or(options, o -> o.getName().equals(option.getName()))) {
          SettingsEditorFragment<Settings, ?> fragment =
            ContainerUtil.find(fragments, f -> f.getId().equals(option.getName()));
          if (fragment != null) {
            if (fragment.isSelected() != fragment.isInitiallyVisible(settings)) { // do not keep option in selected otherwise
              FragmentedSettings.Option updatedOption = new FragmentedSettings.Option(fragment.getId(), fragment.isSelected());
              options.add(updatedOption);
            }
          }
          else {
            options.add(option);
          }
        }
      }
    }
    settings.setSelectedOptions(options);
  }
@Override
  public void applyEditorTo(@NotNull Settings settings)