php – 如何在Eclipse PDT中重新格式化多行注释?
发布时间:2020-12-13 16:38:50 所属栏目:PHP教程 来源:网络整理
导读:在 Eclipse PDT中,Ctrl-Shift-F重新格式化代码.但是,它根本不修改注释.有没有办法将破损的多行评论重新格式化为每行80个字符(或任何)? 即转换 // We took a breezy excursion and // gathered Jonquils from the river slopes. Sweet Marjoram grew // in l
在
Eclipse PDT中,Ctrl-Shift-F重新格式化代码.但是,它根本不修改注释.有没有办法将破损的多行评论重新格式化为每行80个字符(或任何)?
即转换 // We took a breezy excursion and // gathered Jonquils from the river slopes. Sweet Marjoram grew // in luxuriant // profusion by the window that overlooked the Aztec city. 至 // We took a breezy excursion and gathered Jonquils // from the river slopes. Sweet Marjoram grew in // luxuriant profusion by the window that overlooked // the Aztec city. (我认为这也适用于常规的Eclipse.) 更新结果表明,Eclipse在Java模式下将重新格式化上述行,但只有当它们是/ * * / – 样式注释时.它会缩短//太长的行,但是它不会连接在一起太短的行.
您可能需要配置Java格式化程序以包含注释.
首选项 – > Java – >代码样式 – > Formatter – >编辑… – >注释 确保启用“启用XXX注释格式”. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |