Add "Compare with/Replace with" actions to ResourceMappings
commitd37c07fac7a92a026b60ca40f3f0d1b7ae57fbd1
authorStefan Dirix <sdirix@eclipsesource.com>
Mon, 27 Jul 2015 12:36:33 +0000 (27 14:36 +0200)
committerAndrey Loskutov <loskutov@gmx.de>
Wed, 2 Sep 2015 18:37:00 +0000 (2 20:37 +0200)
tree8029a25582dd7f2419b9a34f83f1698016c0fb05
parenta6cb2e476751e780dcc80653dd219b0d248bd565
Add "Compare with/Replace with" actions to ResourceMappings

Add the eGit "Compare with/Replace with" 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: Stefan Dirix <sdirix@eclipsesource.com>
Change-Id: I6f967f72feae10cae29505fa17b81e65e0aa87de
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.egit.ui/plugin.xml
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/SelectionPropertyTester.java