EclipseCodeFormatter icon indicating copy to clipboard operation
EclipseCodeFormatter copied to clipboard

Comment line length gets handle differently when limit is in the middle of a word

Open lucsoft opened this issue 3 years ago • 7 comments

What steps will reproduce the issue?

Set a comment line limit to 90 Write a comment where the last word starts before the 90 limits end (83) ends after the limit (93) Format file Word still on the same line

What is the expected result?

Like in eclipse the word thats in the middle of the limit still gets wrapped (but if its one char over the limit its stays one the line because its displays by one but the limit technically starts by 0)

	/**
	 * test test test test test test test test test test test test test test test test
	 * test
	 */
	public static void Test() {

	}

What happens instead?

If the limit is in the middle of word it gets ignored

	/**
	 * test test test test test test test test test test test test test test test test test
	 */
	public static void Test() {

	}

Paste information about IDE and OS (it can be copied from Help | About dialog).

IDEA 2021.2 RC macOS 11.5.1 eclipse 2021-06 (4.20.0) Eclipse Code Formatter 20.8.203.000.0-Eclipse_2020-06-JavaOnly

lucsoft avatar Jul 27 '21 11:07 lucsoft

Set a comment line limit to 90

Where? In eclipse?

It works fine for me, equally in both IDEs.

krasa avatar Nov 08 '21 09:11 krasa

I am having the same issue, in javadoc of Intellij.

If the column limit is in the middle of a word, Eclipse will wrap it to the next line while Intellij will keep it on the same line and wrap on the end of word.

irasychan avatar May 26 '22 01:05 irasychan

I have the same problem. Is this an Issue with IntelliJ viewing the line limit setting different than eclipse or can this be fixed?

IntelliJ IDEA 2023.3.2 EclipseCodeFormatter Version: 23.3.223.000.0-Eclipse_2023-03

Timons00 avatar Jan 16 '24 14:01 Timons00

please post your Eclipse profile config

krasa avatar Jan 16 '24 15:01 krasa

You mean the eclipse formatter config right? Formatter_20160606.zip

Timons00 avatar Jan 17 '24 07:01 Timons00