문제

I have this piece of Java-Code:

/**
 * 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()];
}

If I press Ctrl + Shift + F, I get this:

/**
 * 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()];
}

Why does eclipse do this pram-line-wrapping? How can I switch it of (without switching it of completely for JavaDoc)?

These are the Formatter settings I currently use in eclipse 3.5.2 (Galileo).

도움이 되었습니까?

해결책

Window > Preferences > Java > Code style > Formatter
(Edit) > Comments
Check box: New line after @param tags

Seen in Juno (4.2).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top