Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 95735

Summary: [formatter] unnecessary line braking
Product: [Eclipse Project] JDT Reporter: Jens <soleroGT>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: frederic_fusier, jarthana, manoj.palat, mateusz.matela, Olivier_Thomann, ric.almeida
Version: 3.1   
Target Milestone: 4.7 M2   
Hardware: PC   
OS: Windows XP   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=264112
https://bugs.eclipse.org/bugs/show_bug.cgi?id=59891
Whiteboard:
Attachments:
Description Flags
Unnessesary Line Breaks Example none

Description Jens CLA 2005-05-18 08:32:19 EDT
The Java formatter adds unnessesary line breaks when formatting long lines. 
Formatted with Eclipse (max length 120 chars):

<pre>
sharkCustomer = getBluSharkCustomerRef()
                                        .updateCompleteCustomer(
                                                                sharkCustomer,
                                                                transformHistory(
                                                                               
 context,
                                                                               
 SharkHistoryEntity.TypeKey.MASTER_DATA_UPDATE));
</pre>

Should really look like this:

<pre>
sharkCustomer = getBluSharkCustomerRef().updateCompleteCustomer(sharkCustomer,
                                                               
transformHistory(context,
                                                                               
 SharkHistoryEntity.TypeKey.MASTER_DATA_UPDATE));
</pre>
Comment 1 Jens CLA 2005-05-18 08:34:58 EDT
Created attachment 21325 [details]
Unnessesary Line Breaks Example

The example formatting in the bug report was lost. So, here is an attachment
with the correct format.
Comment 2 Olivier Thomann CLA 2005-05-18 12:06:54 EDT

*** This bug has been marked as a duplicate of 59891 ***
Comment 3 Frederic Fusier CLA 2010-04-23 06:13:15 EDT
This issue will be considered separately from bug 59891. In fact, it's rather more a fup of bug 264112...
Comment 4 Mateusz Matela CLA 2016-09-01 07:28:11 EDT
I'm not sure if it hasn't been fixed earlier, but it definitely no longer occurs after the formatter redesign.

*** This bug has been marked as a duplicate of bug 303519 ***
Comment 5 Jay Arthanareeswaran CLA 2016-09-14 01:46:01 EDT
Verified for 4.7 M2 with build I20160912-2000