private static int getWidth(@NotNull String indent, int tabSize) {
    int width = 0;
    for (int i = 0; i < indent.length(); i++) {
      char c = indent.charAt(i);
      switch (c) {
        case '\t':
          width = tabSize * (width / tabSize + 1);
          break;
        case ' ':
          width++;
          break;
        default:
          LOG.error("Unexpected whitespace character: " + ((int)c));
          width++;
      }
    }
    return width;
  }
private static int getWidth(@NotNull String indent, int tabSize)