@Override
    public int getTrailingSpacesToLeave(int line) {
      int startOffset = myDocument.getLineStartOffset(line);
      int endOffset = myDocument.getLineEndOffset(line);
      return containsWhitespacesOnly(myDocument.getCharsSequence(), startOffset, endOffset) ? getMaxIndentChars(line): 0;
    }
@Override
    public int getTrailingSpacesToLeave(int line)