@Override
  public void apply() throws ConfigurationException {
    if (editor != null && editor.isModified()) {
      isModified = true;
      editor.apply();
    }

    for (FileTemplateTab list : myTabs) {
      checkCanApply(list);
    }
    updateCache();
    for (Map.Entry<FileTemplatesScheme, Map<String, List<FileTemplate>>> entry : changesCache.entrySet()) {
      manager.setCurrentScheme(entry.getKey());
      Map<String, List<FileTemplate>> templates = entry.getValue();
      manager.setTemplates(FileTemplateManager.DEFAULT_TEMPLATES_CATEGORY, templates.get(FileTemplateManager.DEFAULT_TEMPLATES_CATEGORY));
      manager.setTemplates(FileTemplateManager.INTERNAL_TEMPLATES_CATEGORY,
                           templates.get(FileTemplateManager.INTERNAL_TEMPLATES_CATEGORY));
      manager.setTemplates(FileTemplateManager.INCLUDES_TEMPLATES_CATEGORY,
                           templates.get(FileTemplateManager.INCLUDES_TEMPLATES_CATEGORY));
      manager.setTemplates(FileTemplateManager.CODE_TEMPLATES_CATEGORY, templates.get(FileTemplateManager.CODE_TEMPLATES_CATEGORY));
      manager.setTemplates(FileTemplateManager.J2EE_TEMPLATES_CATEGORY, templates.get(FileTemplateManager.J2EE_TEMPLATES_CATEGORY));
    }
    changesCache.clear();

    manager.setCurrentScheme(myScheme);

    if (editor != null) {
      isModified = false;
      fireListChanged();
    }
  }
@Override
  public void apply()