DESCRIPTION

Change IgnoreOperation to use IPath instead of IResource

This way, it can also be used for non-resource paths, which is necessary
for ignoring non-workspace files from the Staging view.

Bug: 385178
Change-Id: If3fe33bb682408c9acea9b41f80a10cdb38f5a9a


COMMENTS

author: Brenden Conley
date: 2012-09-30 20:51:28.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2012-09-30 21:06:50.000000000

Patch Set 1: Verified

Build Successful 

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

-------------------------------------
author: Marlie Beasley
date: 2012-10-02 14:19:14.000000000

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

(3 inline comments)



Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/job/RuleUtil.java -> If container is IWorkspaceRoot the scheduling rule must be WorkspaceRoot.

Line:69, org.eclipse.egit.core/src/org/eclipse/egit/core/op/IgnoreOperation.java -> Please also provide a constructor consuming resources.
Then no changes in resource-based code are required.

Line:35, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/IgnoreActionHandler.java -> Change is not needed if IgnoreOperation also provides resource based constructor.

-------------------------------------
author: Danika Greer
date: 2012-10-02 21:28:25.000000000

Patch Set 1: (3 inline comments)



Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/job/RuleUtil.java -> Ok, I'll add it. (The old code in IgnoreOperation didn't do that.)

Line:69, org.eclipse.egit.core/src/org/eclipse/egit/core/op/IgnoreOperation.java -> Please see comment in IgnoreActionHandler.java.

Line:35, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/IgnoreActionHandler.java -> Hm, I want to prevent (in an explicit way) that the caller passes `IResource` objects for which getLocation() returns null ("non-workspace resources").

With only an IPath API, the caller has to handle that case. When we'd do it in IgnoreOperation, we would have to decide what to do with such a resource.

What do you think?

-------------------------------------
author: Marlie Beasley
date: 2012-10-04 07:46:18.000000000

Patch Set 1: (1 inline comment)



Line:35, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/IgnoreActionHandler.java -> Good point. On the other hand we need conversion on all resource based locations. Proposal: let's do it as you proposed for the moment and have a look again later when we change other operations also to work with non-workspace files.

-------------------------------------
author: Danika Greer
date: 2012-10-04 19:39:07.000000000

Patch Set 1: (2 inline comments)



Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/job/RuleUtil.java -> Done.

Line:35, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/IgnoreActionHandler.java -> Ok. Maybe we can provide a method in ResourceUtil which takes resources and returns paths.

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