public static XmlTag addWithParam(XmlTag templateTag) throws IncorrectOperationException {
        XmlTag withParamTag = templateTag.createChildTag("with-param", XsltSupport.XSLT_NS, null, false);

        final XmlTag anchor = XsltCodeInsightUtil.findLastWithParam(templateTag);
        final PsiElement c;
        if (anchor != null) {
            withParamTag = (XmlTag)templateTag.addAfter(withParamTag, anchor);
        } else if ((c = XsltCodeInsightUtil.findFirstRealTagChild(templateTag)) != null) {
            withParamTag = (XmlTag)templateTag.addBefore(withParamTag, c);
        } else {
            withParamTag = (XmlTag)templateTag.add(withParamTag);
        }
      withParamTag = (XmlTag)CodeStyleManager.getInstance(withParamTag.getManager().getProject()).reformat(withParamTag);
        return withParamTag;
    }
public static XmlTag addWithParam(XmlTag templateTag)