DESCRIPTION

Add eGit actions to ResourceMappings

Add eGit actions to selections which only adapt to ResourceMapping but
not to IResource. This includes objects like Java-WorkingSets and custom
ResourceMappings.

ResourceMappings can be seen as a collection of resources forming a
logical model. It often makes sense to extend the navigator view to add
symbolic virtual nodes grouping the resources together. However since
there is no "real" resource, the virtual node adapts only to
ResourceMapping.

Selecting these ResourceMappings can be seen as selecting all resources
this mapping traverses. Since eGit's SelectionUtils already supports
ResourceMappings (collecting contained resources), selections adapting
only to ResourceMapping can be supported by simply enabling the actions
on them.

Bug: 474725
Signed-off-by: Ronin Harrell xxx@xxx.xxx
Change-Id: I6f967f72feae10cae29505fa17b81e65e0aa87de


COMMENTS

author: Ronin Harrell
date: 2015-08-25 08:03:30.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2015-08-25 08:03:37.000000000

Patch Set 3:

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

-------------------------------------
author: Ronin Harrell
date: 2015-08-25 08:09:34.000000000

Patch Set 3:

I added additional tests which hide all actions in the following two cases: 1) The resources map to different repositories and 2) Not all resources map to a repository.

I did not touch the Team actions since they are already enabled on ResourceMappings.

When the actions are modified to also support selections of resources pointing to different or no repositories, the individual checks can simply be removed in the plugin.xml

-------------------------------------
author: Jayvion Booth
date: 2015-08-25 08:11:40.000000000

Patch Set 3:

(2 comments)

Line:86, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/SelectionPropertyTester.java -> Looks really strange.
Why not use 
boolean hasRepo = haveRepositories(resources);
return hasRepo;
?

Line:170, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/SelectionPropertyTester.java -> This is really unexpected. We do not use set content at all, so method should just return "false" if there is at least one resource without mapping.

-------------------------------------
author: Ronin Harrell
date: 2015-08-25 08:23:38.000000000

Patch Set 3:

Thanks for your very fast review ;) I modified the code according to your comments.

-------------------------------------
author: Brenden Conley
date: 2015-08-25 08:25:54.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7461/ : SUCCESS

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-02 19:03:52.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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