@Override
  public @NotNull Result charTyped(char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) {
    if (needToInsertQuotes) {
      int offset = editor.getCaretModel().getOffset();
      PsiElement fileContext = file.getContext();
      String toInsert = tryCompleteQuotes(fileContext);
      boolean showPopup = true;
      boolean showParameterInfo = false;
      if (toInsert == null) {
        final String quote = getDefaultQuote(file);
        AttributeValuePresentation presentation = getValuePresentation(editor, file, quote);
        toInsert = presentation.getPrefix() + presentation.getPostfix();
        showPopup = presentation.showAutoPopup();
        showParameterInfo = "{}".equals(toInsert);
      }
      editor.getDocument().insertString(offset, toInsert);
      editor.getCaretModel().moveToOffset(offset + toInsert.length() / 2);
      if (showPopup) {
        AutoPopupController.getInstance(project).scheduleAutoPopup(editor);
      }
      if (showParameterInfo) {
        AutoPopupController.getInstance(project).autoPopupParameterInfo(editor, null);
      }
      needToInsertQuotes = false;
      Caret caret = editor.getCaretModel().getCurrentCaret();
      caret.putUserData(QUOTE_INSERTED_AT, toInsert.isEmpty() ? null : new QuoteInfo(toInsert.charAt(0), caret.getOffset()));
    }

    return super.charTyped(c, project, editor, file);
  }
@Override
  public @NotNull Result charTyped(char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file)