如何使 phpDoc 注释在 Eclipse 中可见
我想知道如何使 PHPDoc 注释在 Eclipse 中在项目范围内可见。目前,它仅适用于当前打开的文件。
如果能够在函数自己的文件之外检查我在每个函数之前放入的所有 @params 和描述,那就太棒了。
多谢!
I wonder how I can make PHPDoc-comments visible in Eclipse on a project-wide basis. For the moment, it only works in the current, open file.
It would be super to be able to check out all the @params and descriptions that I have put in before each function, outside the function's own file.
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您已经通过文档块记录了代码元素,那么当您在代码中使用这些元素时,Eclipse 的悬停弹出窗口功能确实会向您显示其文档块中的内容。这不需要您打开其他文件,例如在 test.php 中编写使用 foo.php 中的 Foo 类的代码...您不需要在编辑器中打开 foo.php 才能使用 Foo test.php 中的对象使悬停弹出文档块信息可见。
如果此类悬停弹出窗口没有向您显示文档块信息,那么您可能需要重新访问 PHP 项目中的 buildpath/includepath 设置,特别是如果您尝试使用的元素实际上是在另一个项目中定义的项目 比你现在工作的那个。
If you have already documented your code elements via docblocks, then when you use those elements in your code, the hover popups feature of Eclipse will indeed show you what's in their docblocks. This doesn't require you to have the other file open, e.g. writing code in test.php that uses class Foo from foo.php... you're not required to have foo.php open in the editor in order for your Foo object in test.php to have hover popup docblock info visible.
If such hover popups are not showing docblock info to you, then you might need to revisit your buildpath/includepath settings in your PHP project, particularly if the elements you're trying to use are actually defined in another project than the one you're working in.