@Override
    public void executeWriteAction(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext) {
      final Document document = editor.getDocument();
      final int caretOffset = editor.getCaretModel().getOffset();
      if (caretOffset < 1) {
        return;
      }

      final SelectionModel selectionModel = editor.getSelectionModel();
      final CharSequence text = document.getCharsSequence();
      final char c = text.charAt(caretOffset - 1);
      if (!selectionModel.hasSelection() && StringUtil.isWhiteSpace(c)) {
        int startOffset = CharArrayUtil.shiftBackward(text, caretOffset - 2, "\t \n") + 1;
        document.deleteString(startOffset, caretOffset);
      }
      else {
        final EditorActionHandler handler = EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_BACKSPACE);
        handler.execute(editor, caret, dataContext);
      }
    }
@Override
    public void executeWriteAction(@NotNull Editor editor, @NotNull Caret caret, DataContext dataContext)