DESCRIPTION

Extract information about supported protocols into separate class

This is an intermediate step to cleanup this class. Later we should
rework this and make the protocol abstraction an extensible part of
the JGit API.

Change-Id: I831431e10febfd378c44e5008bdb51a4f96a64eb
Signed-off-by: Douglas Trujillo xxx@xxx.xxx


COMMENTS

author: Douglas Trujillo
date: 2010-07-02 23:35:22.000000000

Uploaded patch set 5.

-------------------------------------
author: Blake Oneal
date: 2010-07-03 20:28:54.000000000

Patch Set 5: I would prefer that you didn't submit this

(1 inline comment)

As noted, changing from an ArrayList to a TreeMap and using the protocol name as the key will give us an open-ended total ordering which means the ordinal is superflous to requirements.

Line:252, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java -> We shouldn't have an ordinal. An ordinal implies some kind of total ordering over all the elements, which we can't guarantee. For example, if I want to add a new Protocol 'pigeon' I'm going to give it MAX+1 (which is 8 in this case). But if someone else wants to add 'avian' (also as 8) we now have a clash. It gets worse if the next version of (E/J)Git comes out with 'psychic (8)' we now have a duplicate (or triplicate).

The ordinal appears to add no value at all; we can impose a total ordering over the protocol using the lexicographic sorting of the protocol names; instead of using an ArrayList, we can use a TreeMap instead.

Lastly, the value of ordinal appears completely unused.

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