How do I: Create a IDocCommentBlockNode
I have created a class member that I would like to add an XML Comment to.
From the previous forum posts I can see that XMLDocUtil.SubstituteHeader
does not seem like a good way to go.
I have tried some stuff with IDocCommentBlockNode but no luck so far.
Can you give any hints as to how to work with Xml Comments?
Thanks
--Jakob
Please sign in to leave a comment.
1) To set the XML-doc to it's owner you have to call
JetBrains.ReSharper.Psi.ExtensionsAPI.SetDocCommentBlockNode(ITreeNode node,
IDocCommentBlockNode block)
method. Pass 'null' in second parameter to remove XML comment
2) To build XML doc, use the following sample code:
string text = "/// \n\nvoid foo(){}" ICSharpTypeMemberDeclaration declaration = CSharpElementFactory.GetInstance(soulution).CreateTypeMemberDeclaration(text); IDocCommentBlockNode docCommentBlockNode = SharedImplUtil.GetDocCommentBlockNode(declaration.ToTreeNode()); -- Eugene Pasynkov Developer JetBrains, Inc http://www.jetbrains.com "Develop with pleasure!" "Jakob Christensen" wrote in message news:596fcc8c3d8c93da44c317788@news.jetbrains.com... >I have created a class member that I would like to add an XML Comment to. >]]>
>
>
>
>
Hello Eugene,
Thanks, for your quick answer.
--Jakob