Bug 46717 - The code formatter does not insert a new line before /** Javadoc
Summary: The code formatter does not insert a new line before /** Javadoc
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-14 21:14 EST by Gary Gregory CLA
Modified: 2003-11-20 12:00 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Gregory CLA 2003-11-14 21:14:18 EST
Somehow, the "old" (either in 3.0.m3 or m4, I am sorry I cannot recall) Java
code formatter mucked my source such that I now have:

    public void setErrorQOptions(int errorQOptions) {
        this.errorQOptions = errorQOptions;
    } /** Sets the MQSeries error queue. */
    public void setErrorQueue(MQQueue errorQueue) {
        this.errorQueue = errorQueue;
    } /** Sets the MQSeries error queue name to use on open. */
    public void setErrorQueueName(String errorQueueName) {
        this.errorQueueName = errorQueueName;
    } /** Sets the MQ option flags to use for the input queue on open. */
    public void setInputQOptions(int inputQOptions) {
        this.inputQOptions = inputQOptions;
    } /** Sets the MQSeries input queue. */
    public void setInputQueue(MQQueue inputQueue) {
        this.inputQueue = inputQueue;
    } /** Sets the MQSeries input queue name to use on open. */

In 3.0.m4, When I reformat the code with the "old" or "new" formatter, nothing
changes. Perhaps there should be another setting or the formatter should always
make sure that Javadoc comments start on a new line.

Thanks.
Comment 1 Olivier Thomann CLA 2003-11-17 11:26:16 EST
The new formatter tries to keep comments as much as possible where they are. But
in this case. It should add a new line after the method closing brace.
I will investigate.
Comment 2 Olivier Thomann CLA 2003-11-17 11:32:25 EST
In this case, your comments are considered as trailing comment of the preceeding
method.
Comment 3 Olivier Thomann CLA 2003-11-17 12:56:56 EST
I will remove the javadoc comments from the trailing comments. So a javadoc
comment will always be moved on a new line.
Fixed and released in HEAD.
Regression test added.
Comment 4 David Audel CLA 2003-11-20 12:00:20 EST
Verified.