Delphi 2007 中的 HelpInsight 文档

发布于 2024-07-06 03:08:43 字数 558 浏览 17 评论 0原文

我正在使用 D2007,并尝试使用 HelpInsight 功能(自 D2005 起提供)来记录我的源代码。 我主要对让 HelpInsight 工具提示正常工作感兴趣。 从各种网上冲浪和实验中,我发现了以下内容:

  1. 使用三斜杠 (///) 注释样式比其他记录的注释样式更有效。 即:<代码>{*! 评论 *} 和 {! comment }
  2. 注释必须位于其所属声明之前。 对于大多数情况,这意味着将它们放置在代码的接口部分。 (明显的例外是无法从当前单元外部访问的类型和函数,因此在实现块中声明。)
  3. 第一个注释不能用于函数。 (即它必须是针对类型的 - 或者至少看起来解析器必须在 HelpInsight 功能起作用之前已经看到“type”关键字)

尽管遵循这些“规则”,但有时 Help-insight 就是找不到我的注释已经写了。 一个文件不会生成正确的 HelpInsight 工具提示,但如果我将此文件包含在不同的虚拟项目中,它就会正常工作。

有没有人有任何其他指示/技巧来让 HelpInsight 工作?

I am using D2007 and am trying to document my source code, using the HelpInsight feature (provided since D2005). I am mainly interested in getting the HelpInsight tool-tips working. From various Web-surfing and experimentation I have found the following:

  1. Using the triple slash (///) comment style works more often than the other documented comment styles. i.e.: {*! comment *} and {! comment }
  2. The comments must precede the declaration that they are for. For most cases this will mean placing them in the interface section of the code. (The obvious exception is for types and functions that are not accessible from outside the current unit and are therefore declared in the implementation block.)
  3. The first comment cannot be for a function. (i.e. it must be for a type - or at least it appears the parser must have seen the "type" keyword before the HelpInsight feature works)

Despite following these "rules", sometimes the Help-insight just doesn't find the comments I've written. One file does not produce the correct HelpInsight tool-tips, but if I include this file in a different dummy project, it works properly.

Does anyone have any other pointers / tricks for getting HelpInsight to work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

徒留西风 2024-07-13 03:08:44

我发现了另一个警告(在我的例子中,这就是“错误”)

似乎带有 HelpInsight 注释的单元必须明确添加到项目中。 仅将单元放在编译项目时搜索的路径中是不够的。

换句话说,该单元必须包含在项目的 .dpr / .dproj 文件中。 (使用项目|“添加到项目”菜单选项)

I have discovered another caveat (which in my case was what was "wrong")

It appears that the unit with the HelpInsight comments must be explicitly added to the project. It is not sufficient to simply have the unit in a path that is searched when compiling the project.

In other words, the unit must be included in the Project's .dpr / .dproj file. (Using the Project | "Add to Project" menu option)

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