DESCRIPTION

Add ICommitMessageProvider2 for caret positioning in commit messages

The caret in the CommitMessageComponent is placed according to the
value of getDesiredCaretPosition() of the first implementation of
ICommitMessageProvider2 that provides caret position. In case there
are multiple implementations available that provide a defined caret
position the second and subsequent positions are ignored.

Commit messages are not trimmed anymore to ensure consistency between
a provided message and the provided caret position.

Includes unit and UI tests.

Bug: 516867
Change-Id: I1b0ffd33ef37196d53077d09774672c2b033835f
Signed-off-by: James Mcgee xxx@xxx.xxx
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: James Mcgee
date: 2017-06-19 10:22:08.000000000

Uploaded patch set 24.

-------------------------------------
author: Alayna Houston
date: 2017-06-19 12:10:13.000000000

Patch Set 24:

(3 comments)

A few overlooked comments from earlier patch sets.

Hudson is apparently still down.

Line:21, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/stagview/CommitMessageComponentTest.java -> Rename this class. Two classes with the same name in different packages is confusing. Maybe "CommitMessageProvidersTest" or "CommitMessageProvidersPositionTest" or "CommitMessagePositionTest" or some such.

Line:1, org.eclipse.egit.ui/src/org/eclipse/egit/ui/CommitMessageWithCaretPosition.java -> Missing license header.

Line:11, org.eclipse.egit.ui/src/org/eclipse/egit/ui/CommitMessageWithCaretPosition.java -> Missing period.

-------------------------------------
author: James Mcgee
date: 2017-06-19 12:37:22.000000000

Patch Set 24:

(5 comments)

Line:2, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/StagingViewTester.java -> Should your name be added here, since you added a method, Thomas?

Line:21, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/stagview/CommitMessageComponentTest.java -> Done

Line:1, org.eclipse.egit.ui/src/org/eclipse/egit/ui/CommitMessageWithCaretPosition.java -> Done

Line:11, org.eclipse.egit.ui/src/org/eclipse/egit/ui/CommitMessageWithCaretPosition.java -> Done

-------------------------------------
author: Alayna Houston
date: 2017-06-19 13:59:48.000000000

MISMATCHED INLINE COMMENT
Line:2, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/StagingViewTester.java -> Not needed. We do this informally for already existing sources; git gives the full history. In test classes, I usually don't bother. See also http://wiki.eclipse.org/EGit/Contributor_Guide#Copyright .

If we do another patch set, we could update the year at least to 2011, 2017.

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