Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lucsoft opened this issue Jul 27, 2021 · 7 comments

Comments

@lucsoft
Copy link

lucsoft commented Jul 27, 2021

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 lucsoft changed the title Comment line length gets handle diffrently when limit is in the middle Comment line length gets handle differently when limit is in the middle Jul 27, 2021
@lucsoft lucsoft changed the title Comment line length gets handle differently when limit is in the middle Comment line length gets handle differently when limit is in the middle of a word Jul 27, 2021
@krasa
Copy link
Owner

krasa commented Nov 8, 2021

Set a comment line limit to 90

Where? In eclipse?

It works fine for me, equally in both IDEs.

@irasychan
Copy link

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.

@Timons00
Copy link

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

@krasa
Copy link
Owner

krasa commented Jan 16, 2024

please post your Eclipse profile config

@Timons00
Copy link

You mean the eclipse formatter config right?
Formatter_20160606.zip

@stefan-meissner
Copy link

Hello,

we are experiencing this problem as well. I'm not sure if we had this problem before but we bulk reformatted some repositories and identical formatting rules in Eclipse and IDEA (with Eclipse Code Formatter plugin) result in a huge count of diffs because of this problem.

Don't know if something changed in Eclipse or your plugin but right now we don't know how to deal with it.

Thank you,
Stefan

@krasa
Copy link
Owner

krasa commented Jan 22, 2024

Eclipse formatter itself returns the wrong result when called by me. Eclipse IDE must have some extra handling..,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants