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

Bug 376719

Summary: [Compare]Inline compare widget generates additional lines when merging textModel.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: ken_walker, Silenio_Quarti
Version: 0.4   
Target Milestone: 0.5 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2012-04-13 10:11:24 EDT
This is a blocker:
The inline compare widget is generating a merged text by original text + diff blocks with "+" signs.

All the "+" lines were carried in an array, which was split by a line delimeter(\n). When I merge theses lines back to text model I should have used the line delimeter in the splitter, not the line delimeter from the textModel.
Talked to Silenio, this is the right solution.
Comment 2 libing wang CLA 2012-04-13 10:33:32 EDT
It does not always happen  but if happens it will be misleading in the status and commit page.

An example to explain this is :

Original text before change(line delimeter is \r\n):
line 1 \r\n
line 2 \r\n
line 3 \r\n

Diff content text with mixed line ending
+line 1-1 \r\n
+line 1-2 \n

Diff block array split by \n
line 1-1 \r
line 1-2


If I use text model line delimeter, the merged text model will be 
line 1 \r\n
line 1-1 \r\r\n
line 1-2 \r\n
line 2 \r\n
line 3 \r\n

Where line 1-1 becomes two lines.