DESCRIPTION

Support multiple ICommitMessageProvider implementations

In case, that multiple implementations of ICommitMessageProvider
are available in Eclipse, the commit messages of all providers
are concatenated and provided in the CommitMessageComponent.

Bug: 376388
Change-Id: I38f37116956b65fe9433ef77d1728caa4e69c6af
Signed-off-by: Vincent Mcfarland xxx@xxx.xxx
Signed-off-by: James Mcgee xxx@xxx.xxx


COMMENTS

author: James Mcgee
date: 2017-05-11 11:16:15.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2017-05-11 11:16:21.000000000

Patch Set 6:

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

-------------------------------------
author: Brenden Conley
date: 2017-05-11 11:39:25.000000000

Patch Set 6: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/9828/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2017-05-11 11:41:39.000000000

Patch Set 6:

> You're hitting bug 349164 :-(
 > 
 > And although Gunnar had had his fix for cglib merged back in 2014,
 > I see no mockito in Orbit that would have that fix. Latest I find
 > is mockito 1.9.5.v201605172210, but that definitely doesn't include
 > it. (Mockito includes its own copy of cglib...)
 > 
 > Bummer. So we can't use mocking...
 > 
 > Write the test without mockito:
 > 
 xxx@xxx.xxx
 > public void commitMessageProvider_noProvider() throws Exception {
 > CommitMessageComponent commitMessageComponent = new
 > CommitMessageComponent(null) {
 > 
 xxx@xxx.xxx
 > List<ICommitMessageProvider> getCommitMessageProviders() throws
 > CoreException {
 > return new ArrayList<>();
 > }
 > };
 > 
 > String calculatedCommitMessage = commitMessageComponent
 > .calculateCommitMessage(new ArrayList<>());
 > 
 > assertEquals("", calculatedCommitMessage);
 > }
 > 
 > That'll work.

Should we file a CQ for the latest Mockito version (2.8.28 at the moment) and add it to Orbit ?

-------------------------------------
author: Alayna Houston
date: 2017-05-11 12:34:51.000000000

Patch Set 6:

> Should we file a CQ for the latest Mockito version (2.8.28 at the
 > moment) and add it to Orbit ?

Do we know that the problem would indeed be fixed in mockito 2.x by the move away from cglib, as suggested in bug 349164 comment 14?

How could I try that locally?

BTW, the latest I can find on maven central is 2.7.22: https://mvnrepository.com/artifact/org.mockito/mockito-core/2.7.22

Also, it has run-time dependencies on that bytebuddy library, so I guess those would need to come to Orbit, too.

-------------------------------------
author: Alayna Houston
date: 2017-05-12 14:13:48.000000000

Patch Set 6:

(3 comments)

Nice. Some minor things left, and please add tests with a crashing message provider (alone, or in combination with working providers). See HyperlinkTokenScannerTest for an example.

Line:704, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java -> Please change to !message.trim().isEmpty()) {

Line:721, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java -> Remove, we're not throwing CoreException. Then remove the try-catch at lines 690 and 713-716.

Line:729, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CommitMessageComponent.java -> Either remove, or add > at the end.

-------------------------------------
author: Douglas Trujillo
date: 2017-05-12 19:46:20.000000000

Patch Set 6:

> > Should we file a CQ for the latest Mockito version (2.8.28 at the
 > > moment) and add it to Orbit ?
 > 
 > Do we know that the problem would indeed be fixed in mockito 2.x by
 > the move away from cglib, as suggested in bug 349164 comment 14?
 > 
 > How could I try that locally?
 > 
 > BTW, the latest I can find on maven central is 2.7.22:
 > https://mvnrepository.com/artifact/org.mockito/mockito-core/2.7.22
 > 
 > Also, it has run-time dependencies on that bytebuddy library, so I
 > guess those would need to come to Orbit, too.

I found that Mockito has an automatic release bot tagging each accepted pull requests [1]. The latest accepted pull request has tag 2.8.22 
The latest version pushed to Maven central is 2.7.22 [2]. 
The latest version having release notes is 2.5.0 [3].

[1] 
https://github.com/mockito/mockito/blob/master/.github/CONTRIBUTING.md#more-on-pull-requests
[2] https://search.maven.org/#artifactdetails%7Corg.mockito%7Cmockito-core%7C2.7.22%7Cjar
[3] https://github.com/mockito/mockito/blob/master/doc/release-notes/official.md

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