Bug 51810 - [Code Formatter] don't split embedded comments
Summary: [Code Formatter] don't split embedded comments
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: 3.4 RC3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-11 21:33 EST by Jean-Michel Lemieux CLA
Modified: 2008-05-30 13:01 EDT (History)
4 users (show)

See Also:


Attachments
code formatting settings (18.48 KB, text/plain)
2004-02-11 21:33 EST, Jean-Michel Lemieux CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Michel Lemieux CLA 2004-02-11 21:33:01 EST
3.0 20040211
I can't figure out how to configure the new code formatter to allow embedded
comments to remain on the same line. There are many options on the preference
page but I can't find one that would fix this. Note that I have set my line sent
to 800. Actually, I'll attach my current formatting options as a reference.

Given the following code pattern:
class.method(true /*don't force*/, false /*never release lock*/);

After formatting it becomes:
class.method(true /*
                   * don't force
                   */, false /*
                              * never release lock
                              */);
Comment 1 Jean-Michel Lemieux CLA 2004-02-11 21:33:36 EST
Created attachment 7821 [details]
code formatting settings
Comment 2 Dani Megert CLA 2004-02-12 03:30:57 EST
>I can't figure out how to configure the new code formatter to allow embedded
Disable comment formatting - but that's probably not what you want ;-)
Comment 3 Dani Megert CLA 2005-10-10 12:11:36 EDT
Ownership changed.
Comment 4 Olivier Thomann CLA 2007-06-21 11:01:38 EDT
In 3.3, you can disable block comment formatting.
Is this good enough?
Comment 5 Gunnar Wagenknecht CLA 2007-06-21 14:01:08 EDT
For me this is sufficient. :)
Comment 6 Frederic Fusier CLA 2008-05-27 04:37:22 EDT
Using 3.3.2 or 3.4RC2 + comment 1 settings, the following test case:
public class Test {

    static void foo(boolean first, boolean second) {
    }
}

class X {
    void bar() {
        Test.foo(true /* don't force */, false /* never release lock */);
    }
}

is formatted as:
public class Test {

	static void foo(boolean first, boolean second) {
	}
}

class X {

	void bar() {
		Test.foo(true /* don't force */, false /* never release lock */);
	}
}

So it seems that this problem does no longer occurs since a while...
Comment 7 Jerome Lanneluc CLA 2008-05-30 13:01:14 EDT
Verified for 3.4RC3 using I20080530-0100