扩展类文档和实时模板

发布于 2024-12-06 19:47:23 字数 1371 浏览 0 评论 0原文

我正在研究代码文档和实时模板,但我完全不明白。

我已阅读 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:

Class 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷情妓 2024-12-13 19:47:23

仅支持有限的标签集。我所知道的有关此内容的最佳文档是 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).

夏雨凉 2024-12-13 19:47:23

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文