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-18 09:21:48.000000000

Uploaded patch set 2: Commit message was updated.

-------------------------------------
author: Brenden Conley
date: 2015-08-18 09:21:55.000000000

Patch Set 2:

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

-------------------------------------
author: Ronin Harrell
date: 2015-08-18 09:22:55.000000000

Patch Set 2:

Thanks for your review! I extended the commit message with a description and examples.

-------------------------------------
author: Brenden Conley
date: 2015-08-18 09:45:06.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2015-08-23 21:10:45.000000000

Patch Set 2: Code-Review-1

After enabling this I see now the Team-> menu with all Egit contributions on Java working set, this is nice, but... 

None of the actions shown in this menu is enabled, and none of the children drop-down menus after Team-> are functional.

Adding this would only make users angry because they would see those lots of not usable menus and ask: "what the egit developers are smoking, why all this does not work"?

I would +1 on the change if we would enable all those disabled actions (if appropriate) and *hide* all actions which are not applicable on a resource mapping.

-------------------------------------
author: Ronin Harrell
date: 2015-08-24 07:50:57.000000000

Patch Set 2:

Thanks for the review ;)

The actions only work when ALL projects in the WorkingSet are connected with the same Git repository.

We could hide the actions when this is not the case. Would you be okay with that?

As a next step the actions (at least some) could be modified, to also accept files from different repositories (for example the ReplaceWithHEAD action) and filter all files which are not in a repository.

-------------------------------------
author: Jayvion Booth
date: 2015-08-24 07:59:38.000000000

Patch Set 2:

> Thanks for the review ;)
 > 
 > The actions only work when ALL projects in the WorkingSet are
 > connected with the same Git repository.

This was the case, and none of the actions worked for me. I've tried both cases (same/different repos), and for different repos the Team menu was almost empty.

 > We could hide the actions when this is not the case. Would you be
 > okay with that?

Sure, this is what I would expect as user.
 
 > As a next step the actions (at least some) could be modified, to
 > also accept files from different repositories (for example the
 > ReplaceWithHEAD action) and filter all files which are not in a
 > repository.

I think this changes should go to this patch, they do not make sense without each other.

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

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

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