Delphi 2007 中的 HelpInsight 文档
我正在使用 D2007,并尝试使用 HelpInsight 功能(自 D2005 起提供)来记录我的源代码。 我主要对让 HelpInsight 工具提示正常工作感兴趣。 从各种网上冲浪和实验中,我发现了以下内容:
- 使用三斜杠 (///) 注释样式比其他记录的注释样式更有效。 即:<代码>{*! 评论 *} 和
{! comment }
- 注释必须位于其所属声明之前。 对于大多数情况,这意味着将它们放置在代码的接口部分。 (明显的例外是无法从当前单元外部访问的类型和函数,因此在实现块中声明。)
- 第一个注释不能用于函数。 (即它必须是针对类型的 - 或者至少看起来解析器必须在 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:
- Using the triple slash (///) comment style works more often than the other documented comment styles. i.e.:
{*! comment *}
and{! comment }
- 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.)
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了另一个警告(在我的例子中,这就是“错误”)
似乎带有 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)