DESCRIPTION

Make all methods and states of RepositoryState testable properties

E.g. if the current repository state is SAFE, then the isSafe
property of GitResource and GitRepository will be true. The methods,
like canResetHead is also testable. This applies both for
RepositoriesViewProprtyTester (applicable in the Git Repositories View),
as well as for ResourcePropertiesTester (applicable for resources).

For now, we only declare the properties that we actually use in the
properties testers section in plugin.xml.

Change-Id: I5c72f66ceac7678a03c85794251304a3db82d196


COMMENTS

author: Juliet Cantu
date: 2013-01-11 18:02:11.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-01-11 18:27:19.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2013-01-11 18:41:59.000000000

Patch Set 2: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/3961/ : SUCCESS

-------------------------------------
author: Danika Greer
date: 2013-01-11 19:48:40.000000000

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

(1 inline comment)



Line:118, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ResourcePropertyTester.java -> I'd prefer to use the type-safe, explicit and no-magic variant here:

if ("isCherryPickingResolved".equals(property)) return state == RepositoryState.CHERRY_PICKING_RESOLVED;
// ... same for can*

I'm just not a fan of such dynamic code in Java. It will silently break on API changes and it's probably slower. Also, it's harder for people to find the code behind the properties, e.g. searching for "isReverting" will find the simple code, but not the one using reflection.

-------------------------------------
author: Juliet Cantu
date: 2013-01-12 01:02:50.000000000

Patch Set 2: Rebased

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