Bug 540470 - Java Formatter Profile Option "/** and */ on separate lines" is not working
Summary: Java Formatter Profile Option "/** and */ on separate lines" is not working
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-25 10:02 EDT by Mehmet Can Cömert CLA
Modified: 2022-12-29 07:41 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mehmet Can Cömert CLA 2018-10-25 10:02:26 EDT
I have following Java Formatter Option configuration under Comments section:

"/** and */ on separate lines"
option is selected in in the Format settings.

"Never join lines setting "
is not selected.

For the following code snippet I do not get the JavaDoc lines formatted for the "someMember" variable.

public class TestFormatter {

    /** This is one line, hard to read comment. */
    private String someMember = null;

    /**
     * This is what is expected with separate lines option.
     */
    private String someOtherMember = null;

}


I am using currently Eclipse Photon therefore I entered 4.8 as version but it seems behavior exists also older releases.
There is already an old question on Stack overflow about the same issue: 
https://stackoverflow.com/questions/26393422/eclipse-javadoc-formatting-how-to-allow-disallow-single-line-javadoc-comments
Comment 1 Mateusz Matela CLA 2018-10-25 19:09:44 EDT
The intent of this setting is only to avoid multiline comments like this:

/* line one
 * line two */

So I guess it could be worded more clearly and/or a new sub-setting could be added to also affect comments that fit in a single line.
Comment 2 Eclipse Genie CLA 2020-10-18 14:50:33 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2022-12-29 07:41:33 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.