Clean up "Replace With..." actions
commita44e7448f1f5a036223b57432d8866c49412dc81
authorThomas Wolf <thomas.wolf@paranor.ch>
Thu, 20 Oct 2016 20:38:17 +0000 (20 22:38 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 2 Dec 2016 23:56:12 +0000 (3 00:56 +0100)
tree2e72443738cf81010c4a16958e818aaa2637e495
parent01bda60c5937b0cfd272f4b21f679be6c45c9a00
Clean up "Replace With..." actions

Replace deprecated <objectContribution>s by command/handler combos.
Remove now unused legacy actions.

"Replace with HEAD" and "Replace With Index" also work on multiple
repositories. Change the resourcesAllInRepository property test to also
handle repository property tests in order to be able to test the isSafe
property.

Restrict the "Replace with Previous" to tracked resources; on untracked
resources it would only open a dialog telling the user that there was
no previous revision. Which is correct, but then why allow trying to
execute the command at all?

Visual change: previously, "Replace with HEAD" and "Replace With Index"
did not appear on a WorkingSet containing projects from several
repositories. Now they do. It's unclear to me why they didn't before,
and in any case they also appeared before on WorkingSets containing
projects from a single repository. Both commands are and were active
when projects from several repositories were selected.

Bug: 495064
Change-Id: Id0fae18e042aa180310f289e48ad13ad263c9481
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/ReplaceActionsTest.java
org.eclipse.egit.ui/plugin.properties
org.eclipse.egit.ui/plugin.xml
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/DiscardChangesAction.java [deleted file]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithHeadAction.java [deleted file]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ReplaceWithPreviousAction.java [deleted file]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/SelectionPropertyTester.java