DESCRIPTION

SpellcheckableMessageArea: remove platform specific line endings

SpellcheckableMessageArea.getCommitMessage called
getTextWidget().getLineDelimiter() to determine the platform line
ending. This was wrong because getLineDelimiter() returns the first
line delimiter found in the text control.
The new implementation of SpellcheckableMessageArea.getCommitMessage
guarantees that the returned string only contains \n line endings.

Bug: 361504
Change-Id: If1dbab98745d3178163bad4a66ca3f1a15f5b456
Signed-off-by: Marlie Beasley xxx@xxx.xxx


COMMENTS

author: Marlie Beasley
date: 2011-10-28 08:48:40.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2011-10-28 08:48:44.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/1836/ 

-------------------------------------
author: Marlie Beasley
date: 2011-10-28 08:49:56.000000000

Patch Set 3:

Pushed a faster version of Utils.normalizeLineEndings

-------------------------------------
author: Zachary Orozco
date: 2011-10-28 08:56:44.000000000

Patch Set 3: Looks good to me, but someone else must approve; IP review completed



-------------------------------------
author: Brenden Conley
date: 2011-10-28 09:02:39.000000000

Patch Set 3: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1836/ : SUCCESS

-------------------------------------
author: Juliet Cantu
date: 2011-10-29 17:51:54.000000000

Patch Set 3: (1 inline comment)



Line:39, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/Utils.java -> Still, is CR (only) a real issue or not? I don't think it is possible
to run any remotely recent java or Git on that old Macs.

If so, only one replace would do the job more efficiently. After all
this is a utility that may be called from anywhere. I'm not sure having constants for CRLF helps readbility here,

s.replaceAll("\r\n?","\n"); // replace any CRLFs or CRs

I'd prefer the one blow because if someone actually do get CR only, into their messages I'd like to know and understand. Fixing
hypotetical errors are often a source of unnecessary bugs, hard-to-maintain code and bad performance.

s.replaceAll("\r\n","\n"); // replace any CRLFs

-------------------------------------
author: Douglas Trujillo
date: 2011-10-29 22:36:13.000000000

Patch Set 3: (1 inline comment)



Line:39, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/Utils.java -> I agree to Robin's proposal

-------------------------------------
author: Marlie Beasley
date: 2011-11-25 15:26:27.000000000

Patch Set 3: (1 inline comment)



Line:39, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/Utils.java -> I re-implemeted normalizeLineEndings without using the slow replaceAll method (supports regular expressions).
The new implementation also cares for single \r characters, but without additional cost. As you can see in the related bug it "somehow" happened that a single \r made it into the commit message. So I'd like to keep removing single \r characters.

-------------------------------------
