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:22:59.000000000

Uploaded patch set 4.

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

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2015-08-25 08:49:06.000000000

Patch Set 4: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2015-09-01 22:05:34.000000000

Patch Set 4:

(3 comments)

Looks better now. I have few questions still, see code.

Line:408, org.eclipse.egit.ui/plugin.xml -> why do we need that part with the activePart and also with the input below?

Line:4628, org.eclipse.egit.ui/plugin.xml -> The motivation to re-define the "default" popup menu structure is that it should appear on non-IResource elements adapting to ResourceMapping only, mapped to git repo? Right?

Line:7, /COMMIT_MSG -> I think first line should be better rephrased as "Add "Compare with/Replace With" actions to ResourceMappings

Just found out that EGit already works fine with the Java working sets, without this patch :-)

So the "only" visible difference is that the "compare with/replace with" menus are contributed now to the working sets.

-------------------------------------
author: Ronin Harrell
date: 2015-09-02 08:06:55.000000000

Patch Set 4:

(3 comments)

Thanks for your comments! I hope each answer is to your satisfaction ;)

I will upload another PatchSet with the modified Commit Message.

Line:408, org.eclipse.egit.ui/plugin.xml -> You are right, for the purpose of this patch this additional test is not necessary. 

I added it to be consistent with the other definitions which also use this test, so it could possibly be reused like the other ones in the future.

Line:4628, org.eclipse.egit.ui/plugin.xml -> Yes, up until now there is no CompareWith/ReplaceWith menu on elements only adapting to ResourceMapping. That is why I added it here. If there should be such a menu in the future, this menu contribution (as long as that future menu has the same id) does not interfere.

This is consistent with the way eGit contributes to the Team menu in the org.eclipse.ui.menus extension point (line 3816)

Line:7, /COMMIT_MSG -> I agree this wording is a little bit misleading ;)

-------------------------------------
author: Jayvion Booth
date: 2015-09-02 11:14:51.000000000

Patch Set 4:

(1 comment)

Please see last comment.

BTW I haven't received the mail from Gerrit with your comments - only the mail about new build started. Have you experienced communication issues with Gerrit too?

Line:408, org.eclipse.egit.ui/plugin.xml -> Please remove it. If there is no use for it, it is just a burden to maintain extra code.

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

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

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