php – 如何在Eclipse PDT中重新格式化多行注释?

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注释格式”.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...