private boolean applyEditor(FileTemplate prevTemplate) {
    if (editor.isModified()) {
      try {
        isModified = true;
        editor.apply();
        fireListChanged();
      }
      catch (ConfigurationException e) {
        if (currentTab.getTemplates().contains(prevTemplate)) {
          currentTab.selectTemplate(prevTemplate);
        }
        Messages.showErrorDialog(myMainPanel, e.getMessage(), IdeBundle.message("title.cannot.save.current.template"));
        return false;
      }
    }
    return true;
  }
private boolean applyEditor(FileTemplate prevTemplate)