private void updateCache() {
    if (!isSchemeModified() || changesCache.containsKey(myScheme) || internalTemplateNames == null) {
      return;
    }

    Map<String, List<FileTemplate>> templates = new HashMap<>();
    List<FileTemplate> allTemplates = myTemplatesList.getTemplates();
    templates.put(FileTemplateManager.DEFAULT_TEMPLATES_CATEGORY,
                  ContainerUtil.filter(allTemplates, it -> !internalTemplateNames.contains(it.getName())));
    templates.put(FileTemplateManager.INTERNAL_TEMPLATES_CATEGORY,
                  ContainerUtil.filter(allTemplates, it -> internalTemplateNames.contains(it.getName())));
    templates.put(FileTemplateManager.INCLUDES_TEMPLATES_CATEGORY, myIncludesList.getTemplates());
    templates.put(FileTemplateManager.CODE_TEMPLATES_CATEGORY, myCodeTemplatesList.getTemplates());
    templates.put(FileTemplateManager.J2EE_TEMPLATES_CATEGORY,
                  otherTemplatesList == null ? Collections.emptyList() : otherTemplatesList.getTemplates());
    changesCache.put(myScheme, templates);
  }
private void updateCache()