@Override
  void alignToValidBoundaries() {
    Document document = getDocument();
    int startOffset = intervalStart();
    int endOffset = intervalEnd();
    if (startOffset == DocumentUtil.getLineStartOffset(startOffset, document) &&
        endOffset == DocumentUtil.getLineEndOffset(endOffset, document)) {
      myEditor.getFoldingModel().myAffectedCustomRegions.add(this);
    }
    else {
      invalidate();
    }
  }
@Override
  void alignToValidBoundaries()