Skip to content

Commit

Permalink
Updated quick help XML to separate the comment data from the metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mxswd committed Apr 17, 2017
1 parent 4e04061 commit 452e535
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 152 deletions.
326 changes: 175 additions & 151 deletions bindings/xml/comment-xml-schema.rng
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,26 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<optional>
<ref name="Discussion" />
</optional>
<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<optional>
<ref name="Discussion" />
</optional>
</element>
</element>
</define>

Expand Down Expand Up @@ -84,36 +86,40 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="Exceptions" />
</optional>
<zeroOrMore>
<ref name="Availability" />
</zeroOrMore>
<zeroOrMore>
<ref name="Deprecated" />
</zeroOrMore>
<zeroOrMore>
<ref name="Unavailable" />
</zeroOrMore>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<optional>
<ref name="Discussion" />
</optional>

<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="Exceptions" />
</optional>
<zeroOrMore>
<ref name="Availability" />
</zeroOrMore>
<zeroOrMore>
<ref name="Deprecated" />
</zeroOrMore>
<zeroOrMore>
<ref name="Unavailable" />
</zeroOrMore>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<optional>
<ref name="Discussion" />
</optional>
</element>

</element>
</define>

Expand All @@ -140,28 +146,32 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>

<!-- Parameters and results don't make sense for classes, but the user
can specify \param or \returns in a comment anyway. -->
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
<!-- Parameters and results don't make sense for classes, but the user
can specify \param or \returns in a comment anyway. -->
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
</element>

</element>
</define>

Expand All @@ -178,29 +188,32 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>

<!-- Template parameters, parameters and results don't make sense for
variables, but the user can specify \tparam \param or \returns
in a comment anyway. -->
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
<!-- Template parameters, parameters and results don't make sense for
variables, but the user can specify \tparam \param or \returns
in a comment anyway. -->
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
</element>
</element>
</define>

Expand All @@ -217,29 +230,33 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>


<!-- Template parameters, parameters and results don't make sense for
namespaces, but the user can specify \tparam, \param or \returns
in a comment anyway. -->
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
<!-- Template parameters, parameters and results don't make sense for
namespaces, but the user can specify \tparam, \param or \returns
in a comment anyway. -->
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
</element>
</element>
</define>

Expand All @@ -256,29 +273,32 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>

<optional>
<ref name="TemplateParameters" />
</optional>
<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>

<!-- Parameters and results might make sense for typedefs if the type is
a function pointer type. -->
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<optional>
<ref name="TemplateParameters" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
<!-- Parameters and results might make sense for typedefs if the type is
a function pointer type. -->
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
</element>
</element>
</define>

Expand All @@ -295,29 +315,33 @@
<optional>
<ref name="Declaration" />
</optional>
<optional>
<ref name="Abstract" />
</optional>


<!-- Template parameters, parameters and results don't make sense for
enums, but the user can specify \tparam \param or \returns in a
comment anyway. -->
<optional>
<ref name="TemplateParameters" />
</optional>

This comment has been minimized.

Copy link
@cassidysoreal

cassidysoreal May 13, 2019

###

  • [ ]

This comment has been minimized.

Copy link
@cassidysoreal

cassidysoreal May 13, 2019

Disabile

<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>
<element name="CommentParts">
<optional>
<ref name="Abstract" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
<!-- Template parameters, parameters and results don't make sense for
enums, but the user can specify \tparam \param or \returns in a
comment anyway. -->
<optional>
<ref name="TemplateParameters" />
</optional>
<optional>
<ref name="Parameters" />
</optional>
<optional>
<ref name="ThrowsDiscussion" />
</optional>
<optional>
<ref name="ResultDiscussion" />
</optional>

<optional>
<ref name="Discussion" />
</optional>
</element>
</element>
</define>

Expand Down
4 changes: 3 additions & 1 deletion lib/IDE/CommentConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ void CommentToXMLConverter::visitDocComment(const DocComment *DC) {
appendWithXMLEscaping(OS, DeclSS);
OS << "</Declaration>";
}


OS << "<CommentParts>";
visitCommentParts(DC->getParts());
OS << "</CommentParts>";

OS << RootEndTag;
}
Expand Down

0 comments on commit 452e535

Please sign in to comment.