DESCRIPTION

Disable delete config section button for no selection

In the configuration preference page it was possible to use the "Remove"
button without actually selecting any section or sub section before.
This change avoids showing the error message in lines 408 ff.

Change-Id: Ia2c950d4df5affbde06c869efb732d264481d242
Signed-off-by: Jack Yu <Marcel xxx@xxx.xxx

COMMENTS

author: Jack Yu
date: 2017-07-12 15:24:04.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2017-07-12 15:24:09.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2017-07-12 15:48:01.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2017-07-12 19:42:47.000000000

Patch Set 2:

(1 comment)

Line:413, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java -> Sorry I didn't look closely enough the first time. You mention in the commit message that this error now cannot occur anymore. So why not remove all this,including the key in UIText and the text in the uitext.properties?

I see no reason to keep on dragging obsolete code around. Or do you see any way this could occur? Even if it could, I doubt a log entry will be useful here.

-------------------------------------
author: Jack Yu
date: 2017-07-13 05:02:54.000000000

Patch Set 2:

(1 comment)

Line:413, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java -> I just wasn't sure what your policy is for that. Do the smallest change possible to fix the problem or include cleanups as well, this sometimes depends on which project I submit a patch to. Will create new patch set.

Regarding the API problem from patchset 1, how can I actually avoid using a bad method? The Oomph setup automatically sets the egit-4.6 target platform and the API baseline tooling only checks about versioning issues against the previously released version. What am I missing in the automated tooling to assure that the code is compatible to Luna?

-------------------------------------
author: Alayna Houston
date: 2017-07-13 06:25:50.000000000

MISMATCHED INLINE COMMENT
Line:413, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java -> My policy is to clean up if it's related to the change I made.

Much of the EGit code is old (and the missing {} here are a tell-tale sign of that), and was written by many people with different coding styles and evidently also different knowledge about the Eclipse (UI) framework (which moreover has evolved quite a bit overtime). So there are many places where things are done in slightly archaic ways, or where there is obsolete code, and there's too much duplicate code for my taste.

EGit is rather hard to maintain because of that; letting obsolete code sit around is only going to make matters worse since a new contributor will have to spend so much time figuring out why things are as they are only to detect that some things aren't used anymore.

Duplicate code is also bad. If it has a bug, you fix it in one place and think you're done, but the same bug may still lurk in a copy-pasted code piece elsewhere.

 > Regarding the API problem from patchset 1, how can I actually avoid
 > using a bad method? The Oomph setup automatically sets the egit-4.6
 > target platform and the API baseline tooling only checks about
 > versioning issues against the previously released version. What am
 > I missing in the automated tooling to assure that the code is
 > compatible to Luna?

Unfortunately you're not missing anything. The smartimport bundle will not compile on any pre-Neon target platform, which is why the Oomph setup and the Hudson jobs use the egit-4.6 target. We don't even have a Luna target anymore.

So you have to know the potential pitfalls. (And there's quite a few.) I think by now I know most of them, but it still happens that such incompatibilities slip through. There are a few commits in EGit about "backwards compatibility".

I usually do two things shortly before a new release from master:

1. Install the nightly build in a pristine Eclipse Luna-R, and play around a little bit, and
2. Try to compile against the Mars platform (with the smartimport bundle closed).

I think currently the Mars platform is even broken since it references an earlier version of that smartimport stuff that no longer exists in the Mars update sites.

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