扩展类文档和实时模板
我正在研究代码文档和实时模板,但我完全不明白。
我已阅读 Dr.Bob 的文章 关于生成有关实时模板的文档和 wiki 文章,但是我对班级描述有一个问题。
通过类描述,我了解当我将鼠标光标指向类声明时 IDE 的行为。
例如,我有这样的类及其描述:
type
{$REGION 'TMyClass'}
/// <summary>
/// Summary works
/// </summary>
/// <remarks>
/// Remarks works
/// </remarks>
/// <exception cref="www.some.link">This works</exception>
/// <list type="bullet">
/// <item>
/// <description>description does not work</description>
/// </item>
/// <item>
/// <description>description does not work</description>
/// </item>
/// </list>
/// <permission cref="www.some.link">This works</permission>
/// <example>
/// <code>
/// Code example does not work
/// </code>
/// </example>
{$ENDREGION}
TMyClass = class
private
a, b, c: Integer;
public
end;
后来在代码中我有这样的声明:
var
MyObject: TMyClass;
当我将鼠标光标放在类类型上时,我有这样的描述:
如您所见,并非每个 html 标签都是由 IDE 引擎呈现的。我真的很想知道如何呈现附加标签,尤其是带有代码示例的标签。是否可以?
我正在使用 Delphi 2009 Professional。
I am playing with code documentation and live templates and I quite don't get it.
I've read Dr.Bob's article about generating documentation and wiki articles about live templates but I have one problem with class description.
By class description I understand the IDE behaviour when I point my mouse cursor over class declaration.
For example, I have such class with it's description:
type
{$REGION 'TMyClass'}
/// <summary>
/// Summary works
/// </summary>
/// <remarks>
/// Remarks works
/// </remarks>
/// <exception cref="www.some.link">This works</exception>
/// <list type="bullet">
/// <item>
/// <description>description does not work</description>
/// </item>
/// <item>
/// <description>description does not work</description>
/// </item>
/// </list>
/// <permission cref="www.some.link">This works</permission>
/// <example>
/// <code>
/// Code example does not work
/// </code>
/// </example>
{$ENDREGION}
TMyClass = class
private
a, b, c: Integer;
public
end;
And later in the code I have such declaration:
var
MyObject: TMyClass;
When I put mouse cursor over the class type I have such description:
As you see not every html tag was rendered by the IDE engine. I would really want to know how to render additional tags, especially tag with code example. Is it possible?
I am using Delphi 2009 Proffesional.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
仅支持有限的标签集。我所知道的有关此内容的最佳文档是 DevJET Software 的 Delphi 文档指南(在“目录”末尾有 PDF 链接)。
Only limited set of tags is supported. The best documentation about this stuff I'm aware of is the DevJET Software's Delphi Documentation Guidelines (at the end of the "Table of Contents" there is link to the PDF).
Help Insight 支持的标签在联机帮助和 Delphi docwiki 中进行了描述。它们是 C# 帮助标签支持的标签的子集。除了 Embarcadero 网站上列出的标签之外,似乎不支持其他标签(我已经尝试过)。唯一有效(并且是必需的)的其他内容是“<”、“>”和“&”。
更新
似乎有一些产品允许您使用完整的语法,如 @ain 链接的 Delphi 文档指南中所述。 但这需要您购买商业产品,例如 DevJet 的 Documentation Insight,它不应与 IDE 自 Delphi 2006 年以来支持的 Help Insight 相混淆 。
正如您所发现的,我也发现了,只有 Delphi docwiki由裸IDE支持,无需商业产品。还有建模接口支持的文档,但又有所不同。在普通的IDE中,你只能使用你和我已经找到的标签。
The tags Help Insight supports are described in the online help and the Delphi docwiki. They are a subset of the tags C#'s help tags support. No other tags than the ones listed on the Embarcadero site seem to be supported (I have tried them). The only other things that work (and are required) are "<", ">" and """.
Update
There seem to be some products that allow you to use the full syntax as e.g. described in the Delphi Documentation Guidelines linked to by @ain. But that requires you to buy a commercial product like DevJet's Documentation Insight, which should not be confused with the Help Insight the IDE supports since Delphi 2006.
As you found out, and I did too, only the subset described in the Delphi docwiki is supported by the bare IDE without commercial products. There is also the documentation that is supported by the Modelling interface, but that is different again. In the normal IDE, you can only use the tags you and I already found.