DESCRIPTION

Introduce a modelMergeStrategy extension point.

Preference page for users to select the strategy they want.
Make sure that relevant operations use the preferred strategy.

Change-Id: I4d455ce171cca13c780e72b8d27dd929b28c6b71
Signed-off-by: Maleah Marks xxx@xxx.xxx

COMMENTS

author: Maleah Marks
date: 2015-06-16 13:15:56.000000000

Patch Set 5: Commit message was updated

-------------------------------------
author: Brenden Conley
date: 2015-06-16 13:16:03.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2015-06-16 13:35:07.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Zachary Orozco
date: 2015-08-25 14:58:49.000000000

Patch Set 5: Code-Review-1

(5 comments)

It would be nice if this change would contain a Test implementation of the extension point (e.g. OURS,THEIRS). This would allow us to see the new preference pages in real life. Additionally some tests for this test implementation would be nice to ensure that the extension point works. Without an example implementation we don't know whether the extension point works.

Line:9, org.eclipse.egit.core/schema/modelMergeStrategy.exsd -> Is this extension point realy only usable when models are active? You could use this extension point to implement arbitrary strategies which have eclipse dependencies.

Line:238, org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java -> If this extension point does also make sense for strategies not using models then we don't need this check.

Line:256, org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java -> Imagine logical model support is not switched on. JGit already defines a default mergeStrategy. EGit should not hardcode a different default mergeStrategy. What happens if in the future JGit implements a new default merge strategy. We shouldn't be forced to update EGit in such a case.

Currently JGit doesn't expose the default strategy. This could be fixed easily through a static method getDefaultStrategy() in MergeCommand.

Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/SynchronizePreferencePage.java -> the default shouldn't be hardcoded.

Line:35, org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java -> Again: we should not hardcode the default MergeStrategy

-------------------------------------
author: Maleah Marks
date: 2015-08-26 14:44:09.000000000

Patch Set 5:

(5 comments)

Hi Christian,

Thank you very much for the review!

I added a test extension as you requested, so that you can easily see how it looks like.
I also added a test to check that MergeOperations do use the preferred strategy.

I fixed the rest, removing the need for models to be active, and not hard-coding the default strategy.
That led me to make more changes than I imagined, but there we are.

Line:9, org.eclipse.egit.core/schema/modelMergeStrategy.exsd -> You're right, I was blinded by my use-case but there's no reason to limit this extension point to models.
Done.

Line:238, org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java -> Done

Line:256, org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java -> You're completely right.
I have reworked the code to avoid that without having to add anything in JGit.

Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/SynchronizePreferencePage.java -> Done

Line:35, org.eclipse.egit.core/src/org/eclipse/egit/core/GitCorePreferenceInitializer.java -> Done

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-08-31 09:36:26.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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