Bug 561164 - Formatter misses new line after splitting long javadoc line
Summary: Formatter misses new line after splitting long javadoc line
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.16 M1   Edit
Assignee: Jeff Johnston CLA
QA Contact: Jeff Johnston CLA
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-03-16 15:36 EDT by Andrey Loskutov CLA
Modified: 2020-04-07 12:36 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2020-03-16 15:36:47 EDT
Version: 2020-06 (4.16)
Build id: I20200314-1800

Copy the class below inside eclipse.platform.ui/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui

type any character (let say space " ") after "save" word and hit Ctrl+S

##################################
package org.eclipse.ui;

class TestFormatterBug {
	/**
	 * hello bug this is a cool one, it will add asterisk inside comment line on save
	 */
	void hallo() {

	}
}
##################################


Tha javadoc line will be auto-formatted to


##################################
package org.eclipse.ui;

class TestFormatterBug {
	/**
	 * hello bug this is a cool one, it will add asterisk inside comment line on	 * save
	 */
	void hallo() {

	}
}
##################################

The "* save" part misses a new line, so it appears on the same line with the begin of the comment.
Haven't tried on 4.15 or older.
Comment 1 Mateusz Matela CLA 2020-03-16 18:30:57 EDT
The effect stops when the "Remove trailing whitespace" Save action is turned off.
Looks like something introduced with bug 488229.
Comment 2 Jeff Johnston CLA 2020-03-17 14:55:06 EDT
(In reply to Mateusz Matela from comment #1)
> The effect stops when the "Remove trailing whitespace" Save action is turned
> off.
> Looks like something introduced with bug 488229.

I'll look into it.
Comment 3 Andrey Loskutov CLA 2020-03-17 15:03:48 EDT
(In reply to Jeff Johnston from comment #2)
> I'll look into it.

Thanks.
Comment 4 Eclipse Genie CLA 2020-03-17 15:24:13 EDT
New Gerrit change created: https://git.eclipse.org/r/159565
Comment 6 Jeff Johnston CLA 2020-03-19 18:35:50 EDT
Released for 4.16M1
Comment 7 Jeff Johnston CLA 2020-04-07 12:36:26 EDT
Verified for 4.16M1 using I20200407-0120 build