private static int getEndOffset(@NotNull List<? extends TemplateLanguageBlock> tlBlocks, @NotNull List<? extends DataLanguageBlockWrapper> foreignBlocks) {
    return Math.max(foreignBlocks.get(foreignBlocks.size() - 1).getTextRange().getEndOffset(),
                    tlBlocks.get(tlBlocks.size() - 1).getTextRange().getEndOffset());
  }
private static int getEndOffset(@NotNull List<? extends TemplateLanguageBlock> tlBlocks, @NotNull List<? extends DataLanguageBlockWrapper> foreignBlocks)