private void restoreDefaults(@NotNull Set<String> toDisable) {
    Map<String, FileTemplateBase> templates = getTemplates();
    templates.clear();
    sortedTemplates = null;
    for (DefaultTemplate template : defaultTemplates) {
      BundledFileTemplate bundled = new BundledFileTemplate(template, isInternal);
      String qName = bundled.getQualifiedName();
      FileTemplateBase previous = templates.put(qName, bundled);
      if (previous != null) {
        LOG.error("Duplicate bundled template " + qName + " [" + template + ", " + previous + ']');
      }
      if (toDisable.contains(bundled.getQualifiedName())) {
        bundled.setEnabled(false);
      }
    }
  }
private void restoreDefaults(@NotNull Set<String> toDisable)