在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
模式将重新上面的线,但只有当他们/ * * / -风格的注释。 这将缩短//太长线,但它不会加入太短在一起线。