void resetUi() {
    myKeyField.setText(myTemplate.getKey());
    myDescription.setText(myTemplate.getDescription());
    myExpandByCombo.setSelectedItem(getShortcutText());

    CommandProcessor.getInstance().executeCommand(
      null, () -> ApplicationManager.getApplication().runWriteAction(() -> {
        final Document document = myTemplateEditor.getDocument();
        document.replaceString(0, document.getTextLength(), myTemplate.getString());
      }),
      "",
      null
    );

    myCbReformat.setSelected(myTemplate.isToReformat());
    myCbReformat.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(@NotNull ActionEvent e) {
        myTemplate.setToReformat(myCbReformat.isSelected());
      }
    });

    myExpandByCombo.setEnabled(isExpandableFromEditor());

    updateHighlighter();
    validateEditVariablesButton();
  }
void resetUi()