DESCRIPTION

Use "Check out" as default button label in checkout confirmation dialog

Add new button label String with mnemonic and replaces the default
button label. 

The changes are only visible for JFace API version 3.13.0 and higher.

Bug 511691
Change-Id: Ifd2e36e56ac44e64b62f69fe07040b215aa2b211
Signed-off-by: Simon Ellison xxx@xxx.xxx

COMMENTS

author: Simon Ellison
date: 2017-05-09 15:49:05.000000000

Uploaded patch set 4.

-------------------------------------
author: Simon Ellison
date: 2017-05-09 15:57:31.000000000

Patch Set 4:

Thanks for the feedback! I changed it and only put the call to the new message dialog api into a new method. I tested it locally with Neon and it does not throw an exception and the dialog comes up.

-------------------------------------
author: Brenden Conley
date: 2017-05-09 16:11:12.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2017-05-09 16:12:44.000000000

Patch Set 4: Verified-1

Build Failed 

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

-------------------------------------
author: Simon Ellison
date: 2017-05-09 16:35:10.000000000

Patch Set 4:

Could you please give a hint what I am missing?!

-------------------------------------
author: Jayvion Booth
date: 2017-05-10 06:30:02.000000000

Patch Set 4:

> Could you please give a hint what I am missing?!

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.0.0:compile (default-compile) on project org.eclipse.egit.ui: Compilation failure: Compilation failure:
[ERROR] /home/hudson/genie.egit/.hudson/jobs/egit.gerrit/workspace/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java:[523]
[ERROR] return MessageDialogWithToggle.open(MessageDialog.CONFIRM,
[ERROR] ^^^^
[ERROR] The method open(int, Shell, String, String, String, boolean, IPreferenceStore, String, int) in the type MessageDialogWithToggle is not applicable for the arguments (int, Shell, String, String, String, boolean, IPreferenceStore, String, int, LinkedHashMap<String,Integer>)

-------------------------------------
author: Zaid Mosley
date: 2017-05-10 06:44:10.000000000

Patch Set 4:

@David, see comment from Thomas:
As long as we build against Neon on Hudson this will not compile.

-> The EGit team has to decide, if they want to compile against Oxygen.

-------------------------------------
author: Alayna Houston
date: 2017-05-10 08:05:55.000000000

Patch Set 4:

xxx@xxx.xxx see comment from Thomas:
 > As long as we build against Neon on Hudson this will not compile.
 > 
 > -> The EGit team has to decide, if they want to compile against
 > Oxygen.

My 2¢: I'm rather against that. In fact, I'd rather we build against an even older target (Mars, which is our oldest target). EGit is supposed to work on Luna. So in theory we should build against a Luna target (but we don't have one anymore) and run the tests on Oxygen, or build against a newer target such as Oxygen but run the tests on Luna (though that may or may not uncover such problems, depending on whether the code in question is exercised in tests, so we would have to be much more stringent with requiring tests for any new code).

Already in Neon there were changes that can get you in trouble when writing new code (an example: default methods in interfaces, for instance IContentProvider.inputChanged(): if you create a new content provider and forget to override this method, the code will crash on Mars and earlier with "cannot call abstract method", but if you develop, build, and test against a Neon or newer target, you'll never notice that until it's too late, and JDT will not prompt you to override this method since it's a default method as of Neon). In Oxygen, there've been many more such changes, and new methods (functional interface helper methods etc.), so chances will be even higher that you write code that won't work on anything pre-Oxygen and that you won't notice it.

I also think that all this version checking and doing different things based on the JFace version is overkill for something as trivial as changing an "Ok" button label to "Check out".

That said, I think the decision what platform we build against is ultimately Matthias' decision.

-------------------------------------
author: Alayna Houston
date: 2017-05-10 08:09:31.000000000

Patch Set 4:

> Thanks for the feedback! I changed it and only put the call to the
 > new message dialog api into a new method. I tested it locally with
 > Neon and it does not throw an exception and the dialog comes up.

David, you're building against the Oxygen target and are running it on Neon. That would work. But Hudson builds against the Neon target, where the new constructor doesn't even exist, so it fails already during compilation.

-------------------------------------
author: Jayvion Booth
date: 2017-05-10 08:13:49.000000000

Patch Set 4:

> xxx@xxx.xxx see comment from Thomas:
 > > As long as we build against Neon on Hudson this will not compile.
 > >
 > > -> The EGit team has to decide, if they want to compile against
 > > Oxygen.
 > 
 > My 2¢: I'm rather against that.

I fully agree with Thomas. Building against Oxygen is a no-go as long as we support older platforms, and we do that and I don't think we are going to change it any time soon. We always tried to support older releases as long as possible, for the cost of not using "latest greatest" stuff from the platform.

-------------------------------------
author: Douglas Trujillo
date: 2017-05-10 08:15:52.000000000

Patch Set 4:

(1 comment)

Line:507, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java -> I doubt it makes sense to add such complexity for just changing a button label. If you start doing that for each and every dialog and wizard we add a lot of complexity for a little cosmetic change.

I think this should wait until our base version is Oxygen.

-------------------------------------
author: Simon Ellison
date: 2017-05-10 08:46:52.000000000

Patch Set 4:

Thanks for the feedback and detailed explanation!!! So, for now, I would skip the egit "change button label"-bugs that require the new API on my list.

-------------------------------------
author: Alayna Houston
date: 2017-06-25 10:53:51.000000000

Patch Set 4:

See https://git.eclipse.org/r/#/c/100003/ for an approach that does not rely on interfaces introduced only in JFace 3.13.

-------------------------------------
author: Alayna Houston
date: 2017-07-01 11:02:21.000000000

Abandoned

superseded by https://git.eclipse.org/r/#/c/100003/ .

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