Zend Studio 7.2.1 不会在 PHPDoc 块中自动创建 @return

发布于 2024-10-08 09:24:29 字数 330 浏览 0 评论 0原文

我最近从 Zend Studio for Eclipse 6.1.2 升级到 7.2.1。

在包含 return 的 PHP 方法正上方,当我键入 /** 并按 ENTER 时,让 Zend Studio 自动生成 PHPDoc 块,Zend Studio 7.2.1 成功创建 PHPDoc 块,但它没有在块中放置 @return 。 Zend Studio 6.2.1 完美地做到了这一点。

我花了很多时间在 Zend Studio 7.2.1 中尝试使用(广泛的)首选项,但无济于事。有什么想法吗?谢谢!

I recently upgraded from Zend Studio for Eclipse 6.1.2 to 7.2.1.

Directly above a PHP method which contains a return, when I type /** and hit ENTER as to let Zend Studio automatically generate the PHPDoc block, Zend Studio 7.2.1 creates the PHPDoc block successfully however it does not put an @return in the block. Zend Studio 6.2.1 did this perfectly.

I spent a lot of time playing around the with (extensive) preferences in Zend Studio 7.2.1 to no avail. Any ideas? Thanks!

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

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

发布评论

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

评论(4

伴我老 2024-10-15 09:24:29

我没有看到 @return 包含在 Galileo 或 Helios 版本的 Eclipse PDT 的自动文档块中。也许 ZS6 所基于的 Eclipse PDT 曾经这样做过,并且在 ZS7 所基于的后续 Eclipse PDT 版本中删除了它。

I don't see @return being included in auto-docblocks in Eclipse PDT for Galileo or Helios versions. Perhaps the Eclipse PDT that ZS6 was based on used to do this, and it was removed in the later Eclipse PDT versions that ZS7 is based on.

情独悲 2024-10-15 09:24:29

窗口 -> 首选项 -> php -> 代码样式 -> 代码模板:注释 -> 方法

Window->preferences->php->Code Style->Code Teplates : Coments->Method

秋风の叶未落 2024-10-15 09:24:29

使用 Zend Studio 7.2.1,我的“Window->preferences->php->Code Style->Code Teplates : Coments->Method”显示以下内容,但仍然没有添加 @return

/**

*

* ${cursor}${tags}

* @return data_type

<代码>*/

Using Zend Studio 7.2.1, my "Window->preferences->php->Code Style->Code Teplates : Coments->Method" displays the following and still doesn't add the @return

/**

*

* ${cursor}${tags}

* @return data_type

*/

伪装你 2024-10-15 09:24:29

这是 PDT 中的一个已知错误。它已在 PDT SVN 中修复。该错误的解决方案是,在函数语句之前输入“/** ENTER”不会触发正确的代码模板。

在升级到最新的 PDT 之前(或者可能在 ZS9 发布之前),您可以使用“源 -> 生成元素注释”菜单或“SHIFT + CTRL + J”捷径,它会成功。

同样的错误和解决方法适用于 Zend Studio 8 分支。

This is a known bug in PDT. It is fixed in PDT SVN. The resolution of the bug is, typing "/** ENTER" right before a function statement doesn't trigger the correct code template.

Until you upgrade to the latest PDT (or perhaps until ZS9 is released) you can use "Source -> Generate Element Comment" menu or "SHIFT + CTRL + J" shortcut, it'll do the trick.

Same bug and workaround applies for Zend Studio 8 branch.

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