DESCRIPTION

EGit operation / action refactoring

Replace IWorkspaceRunnable in EGit operations (e.g. BranchOperation)
by a new interface IEGitOperation.
BranchOperation now uses a workspace runnable to lock the workspace
while the working tree is modified.
BranchAction executes BranchOperation in a Job. The other actions
will be adopted to this execution pattern in further commits.

Signed-off-by: Marlie Beasley xxx@xxx.xxx

COMMENTS

author: Jaylon Avila
date: 2010-04-28 15:25:27.000000000

Patch Set 1: No score

What do we gain from implementing IEGitOperation instead of IWorkspaceRunnable?

-------------------------------------
author: Marlie Beasley
date: 2010-04-28 15:32:49.000000000

Patch Set 1: No score

IWorkspaceRunnable is no good interface for an operation. The user thinks he has to execute the operation using Workspace.run. But that is not right for all EGit operations.
Currently many operations are used by just calling op.run.
Thus I introduced a new interface with an execute method. Those operations that need a workspace runnable and a scheduling rule do the workspace runnable in their execute method (e.g. branch). It's an internal of an operation how it needs to execute.

-------------------------------------
author: Jaylon Avila
date: 2010-04-28 15:58:05.000000000

Patch Set 1:

Thanks Jens, that clears it up for me. Personally, I'd just have it be named IGitOperation without the 'E' bit but that might be just me.

Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> Why are we locking the entire workspace here? I do not want my CVS projects to be locked if I'm doing a Git operation.

Line:1, org.eclipse.egit.core/src/org/eclipse/egit/core/op/IEGitOperation.java -> Please add a license header to this file.

-------------------------------------
author: Marlie Beasley
date: 2010-04-29 11:14:34.000000000

MISMATCHED INLINE COMMENT
Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java -> We do not know which projects will be affected by the branch operation. It's e.g. possible that changes in a project are performed that resides in an EGit repo but the project is not shared with EGit.
Thus I think it's safer to lock the complete WS.

-------------------------------------
author: Marlie Beasley
date: 2010-04-29 11:14:34.000000000

MISMATCHED INLINE COMMENT
Line:1, org.eclipse.egit.core/src/org/eclipse/egit/core/op/IEGitOperation.java -> Done

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