我有这段Java代码:
/**
* Initializes the Levenshtein Object with the two given words.
*
* @param word1 first word
* @param word2 second word
*/
public Levenshtein(String word1, String word2) {
this.word1 = "." + word1.toLowerCase();
this.word2 = "." + word2.toLowerCase();
this.distance = new int[this.word2.length()][this.word1
.length()];
}
如果按Ctrl + Shift + F,我会得到:
/**
* Initializes the Levenshtein Object with the two given words.
*
* @param word1
* first word
* @param word2
* second word
*/
public Levenshtein(String word1, String word2) {
this.word1 = "." + word1.toLowerCase();
this.word2 = "." + word2.toLowerCase();
this.distance = new int[this.word2.length()][this.word1
.length()];
}
为什么eclipse会做这种婴儿车换行?如何切换它(没有完全切换为JavaDoc)?
这是我目前在eclipse 3.5.2(Galileo)中使用的Formatter settings。
答案 0 :(得分:16)
窗口>偏好> Java>代码风格>格式化
(编辑)>评论
复选框:@param标签后的新行
见于朱诺(4.2)。