DESCRIPTION

Clean up "Compare With" actions

Replace the old-style <objectContribution> to org.eclipse.ui.popupMenus
by command/handler combos. Remove the defaultHandlers for those
commands, and the now unused legacy actions. Re-order the commands as
they were.

There should be no functional or visual change except that the commands
are hidden completely when not enabled (as opposed to being visible but
disabled).

The four commands had to be handled in one change to preserve the oder
in which they appear in the sub-menu. Doing this one by one would lead
to intermediary states where the order was different.

* CompareIndexWithHead: activate the handler on a single selection for
  which hasStagedChanges() is true. Hide it when not enabled. Make the
  ResourceStatePropertyTester also work for items that adapt
  only to IPath but not to IResource, like StagingEntry, otherwise
  the new <handler> definition would not be active for those, which
  would have broken the comparison on a staged file (double click) in
  the staging view. Remove the now unused CompareIndexWithHeadAction,
  and the alwaysCheckEnabled() work-around.
  
* CompareWithPrevious: activate handler only if the selection indeed
  has tracked resources. Formerly, the command was enabled for
  untracked resources, but then presented a dialog that it couldn't
  find any previous version. Add a new property "hasTrackedResources"
  to the ResourceStatePropertyTester.
  
* CompareWithIndex: de-activate the handler if there are only ignored
  resources in the selection. The command works in that case, too, but
  simply presented an empty comparison in that case, which is a bit
  pointless.
  
  Prevent NPE in CompareTreeView if the comparison is empty.
  
* CompareWithHead: disable if there are no non-ignored resources in
  the selection.

Bug: 495064
Change-Id: Ia9fd7768f417f2d2ac08fd271a04da9da15cc7c7
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-10-16 08:34:17.000000000

Uploaded patch set 1.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-10-18 22:50:46.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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