Bug 104004 - Incorrect source formatting
Summary: Incorrect source formatting
Status: VERIFIED DUPLICATE of bug 264112
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-15 10:01 EDT by Trevor Spiteri CLA
Modified: 2010-04-27 07:04 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor Spiteri CLA 2005-07-15 10:01:18 EDT
If in a file I type in this code:

class C {
	void foo() {
		a.b(1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
				1234567);
	}
}

and choose Source->Format from the menus, the source is incorrectly formatted as:

class C {
	void foo() {
		a
				.b(1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
						1234567);
	}
}
Comment 1 Olivier Thomann CLA 2007-05-30 14:08:55 EDT
*** Bug 189983 has been marked as a duplicate of this bug. ***
Comment 2 Adam Cabler CLA 2007-05-30 14:11:55 EDT
(In reply to comment #1)
> *** Bug 189983 has been marked as a duplicate of this bug. ***
> 

I see this has been around since 05.  Is this difficult to fix, or proper formatting just not a priority atm?
Comment 3 Olivier Thomann CLA 2007-05-30 14:14:42 EDT
It is a matter of getting time allocated to work on it.
Hopefully I'll be able to do it for 3.4.
Comment 4 Roland Tepp CLA 2007-05-31 05:48:52 EDT
This is really annoying bug and is THE reason that keeps me from regularly using the source code formatting.

All the other automated source code formatting weirdnesses I can live with, but the very reason to have automatic code wrapping is to constrain lines within certain screen width and this bug effectively defeats this by making the wrapped line even longer than original.

As far as the readability goes - personally for me, this bug reduces it as well. By creating visual white space between object and the method call, it disconnects these two visually in a way that also disconnects them mentally.

Please fix it - this should not be difficult fix.
(or at least point me to the packages/classes that handle this line breaking logic so that me or anybody with few minutes of spare time can have a stab at this problem...)
Comment 5 Olivier Thomann CLA 2007-05-31 08:48:04 EDT
This is too late for 3.3.
If it bothers people so much, then a patch is welcome.
Comment 6 Olivier Thomann CLA 2007-06-21 12:20:33 EDT

*** This bug has been marked as a duplicate of bug 59891 ***
Comment 7 Frederic Fusier CLA 2010-04-14 06:55:44 EDT
It was in fact more a duplicate of bug 264112, hence it's fixed since 3.6M5.

*** This bug has been marked as a duplicate of bug 264112 ***
Comment 8 Satyam Kandula CLA 2010-04-27 07:00:30 EDT
Verified for 3.6M7 using build I20100424-2000
Comment 9 Jay Arthanareeswaran CLA 2010-04-27 07:04:29 EDT
Verified.