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

COMMENTS

author: Alayna Houston
date: 2017-06-13 12:05:06.000000000

Uploaded patch set 13.

-------------------------------------
author: Brenden Conley
date: 2017-06-13 12:05:11.000000000

Patch Set 13:

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

-------------------------------------
author: Brenden Conley
date: 2017-06-13 12:05:39.000000000

Patch Set 13: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/9920/ : FAILURE

-------------------------------------
author: James Mcgee
date: 2017-06-13 12:21:55.000000000

Patch Set 13:

> There is no need to add a new test bundle just for that extension
 > point. I've removed the new bundle and moved the extension point
 > over to the test fragment itself.
 > 
 > I've re-written the TestCommitMessageProviderExtensionFactory to be
 > a real IExecutableExtensionFactory, moved the new UI test over to
 > package ...stagview, and introduced a new abstract super class for
 > the StagingViewTest and the new CommitMessageComponentTest.
 > 
 > Finally I've simplified StagingViewTester.getCaretPosition().
 > 
 > I guess with that head-start you could add more UI tests? Like,
 > extend this such that one can set several providers on
 > TestCommitMessageFactory.INSTANCE, which would then be returned in
 > sequence, and then add a second extension to be able to test that
 > only the first position returned is indeed taken.
 > 
 > Locally, the tests succeed. Now let's see what Hudson means...

Great!! Thanks!!

I will take a closer look later, and add more tests.

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