private static int getStartOffset(@Nullable SmartPsiFileRange smartPsiFileRange) {
    int offset = -1;
    if (smartPsiFileRange != null) {
      var range = smartPsiFileRange.getRange();
      offset = range != null ? range.getStartOffset() : -1;
    }
    return offset;
  }
private static int getStartOffset(@Nullable SmartPsiFileRange smartPsiFileRange)