private static void restoreSuffixComments(PsiElement target, List<? extends PsiElement> suffix) {
    if (!suffix.isEmpty()) {
      PsiElement lastChild = target.getLastChild();
      if (lastChild instanceof PsiComment && JavaTokenType.END_OF_LINE_COMMENT.equals(((PsiComment)lastChild).getTokenType())) {
        PsiElement nextSibling = target.getNextSibling();
        if (nextSibling instanceof PsiWhiteSpace) {
          target.add(nextSibling);
        } else {
          target.add(PsiParserFacade.getInstance(target.getProject()).createWhiteSpaceFromText("\n"));
        }
      }
      StreamEx.ofReversed(suffix).forEach(target::add);
    }
  }
private static void restoreSuffixComments(PsiElement target, List<? extends PsiElement> suffix)