private static void startParameterListTemplate(@NotNull InsertionContext context,
                                                   Editor editor,
                                                   Document document,
                                                   Project project, RangeMarker paramListMarker) {
      PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(document);
      int tail = editor.getCaretModel().getOffset();
      if (paramListMarker.isValid() && tail >= paramListMarker.getEndOffset()) {
        PsiDocComment docComment =
          PsiTreeUtil.findElementOfClassAtOffset(context.getFile(), paramListMarker.getStartOffset(), PsiDocComment.class, false);
        if (docComment != null) {
          TemplateImpl template = new TemplateImpl("", "");
          ConstantNode node = new ConstantNode(document.getText(paramListMarker.getTextRange()));
          template.addVariable("PARAMETERS", node, node, true);
          template.addTextSegment(document.getText(TextRange.create(paramListMarker.getEndOffset(), tail)));
          template.addEndVariable();
          template.setToShortenLongNames(false);

          editor.getCaretModel().moveToOffset(paramListMarker.getStartOffset());
          document.deleteString(paramListMarker.getStartOffset(), tail);

          TemplateManager.getInstance(project).startTemplate(editor, template);
        }
      }
    }
private static void startParameterListTemplate(@NotNull InsertionContext context,
                                                   Editor editor,
                                                   Document document,
                                                   Project project, RangeMarker paramListMarker)