protected int calcIndent(int offset) {
      if (offset == myStartOffset) {
        return myIndent;
      }

      int answer = 0;
      offset--;
      while (offset >= myStartOffset) {
        final char c = myBuffer.charAt(offset);
        if (c == '\n') {
          return answer;
        }

        if (!StringUtil.isWhiteSpace(c)) {
          return -1;
        }

        answer++;
        offset--;
      }
      return answer + myIndent;
    }
protected int calcIndent(int offset)