Netbeans:PhpDoc 格式化
如何在 Netbeans 中自动格式化 PhpDoc 注释?
我希望注释像这样对齐:
* @author Author Name <[email protected]>
* @package Doctrine
* @subpackage Table
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @version $Revision: 67999 $
* @link www.phpdoctrine.org
* @since 1.0
当我在 Netbeans 中键入 /**[Enter]
时,它会自动从方法定义中将所有参数导入为 @param
。但是,当注释已经生成时,我向定义添加一个新变量。现在怎么办?如何触发评论重解析并添加新添加的参数?
How to automatically format PhpDoc comments in Netbeans?
I'd like to have comments aligned like this:
* @author Author Name <[email protected]>
* @package Doctrine
* @subpackage Table
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @version $Revision: 67999 $
* @link www.phpdoctrine.org
* @since 1.0
When I type /**[Enter]
in Netbeans, it automatically imports all parameters as @param
from the method definition. But then, when the comment is already generated I add a new variable to the definition. What now? How to trigger comment reparse and add newly added parameter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在当前版本中不可能。我只是使用
TAB
来对齐文档。Not possible in current version. I just use
TAB
to align the docs.不确定这是否有效,但它是一个格式化程序,允许您创建自定义配置文件,您可以在其中指定从注释块到类、字段、方法声明的所有内容的间距/缩进。它允许您按下 Ctrl+F 来根据您在配置文件中指定的内容自动设置代码格式。维护代码外观以提高可读性的好方法,无需涉及体力劳动。
http://en.sourceforge.jp/projects/pdt-tools/
Not sure if this will work, but its a formatter that allows you to create a custom profile where you dictate the spacing/indentation of everything from your comment blocks to your class, field, methods declarations. It allows you to be able to hit Ctrl+F to have your code automatically format according to what you specify in your profile. Great way of maintaining the appearance of your code for readability without the manual labor involved.
http://en.sourceforge.jp/projects/pdt-tools/