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-01 09:10:06.000000000

Uploaded patch set 3.

-------------------------------------
author: Douglas Trujillo
date: 2010-07-01 09:17:57.000000000

Patch Set 3:

My goal was to cleanup this class a bit since protocol intrinsic information was spread over the whole class RepositorySelectionPage. 

I agree that in another step we should further refine this and find a solution to make this part of the JGit API. I also agree that for a public API the currently chosen enum approach might not be optimal. Hence I switched visibility of the enum to private to make clear that this implementation is not part of any public API.

But still I believe this proposal is cleaner than the previous implementation.

-------------------------------------
author: Ace Duncan
date: 2010-07-01 10:07:15.000000000

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



-------------------------------------
author: Blake Oneal
date: 2010-07-01 11:14:52.000000000

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

I think you could keep this proto implementation but switch the enum to a static class without losing any of the cleaned up logic. At least with a class, there's a possibility that it will be used as the refactored class for JGit and we're setting the bar for an open, rather than closed, set at this point.

So I'd suggest:

private static class Protocol {
  private static final SSH = new Protocol("ssh",true,true...);
  private static final FILE = new Protocol("file",true)... xxx@xxx.xxx ... }
}

This may subsequently evolve to an abstract class and concrete subclasses instead of on-the-fly inner classes, but I think stays true to this initial goal of the tidy up.

-------------------------------------
author: Ace Duncan
date: 2010-07-01 10:07:14.000000000

MISMATCHED INLINE COMMENT
Line:115, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RepositorySelectionPage.java -> We need some arguments to be mentioned right here (much better) or in the commit message (at least).

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