Use newer trash icon on Eclipse Photon or newer
commit20e65d22fa25e6a0756357703b5f162506560548
authorThomas Wolf <thomas.wolf@paranor.ch>
Mon, 16 Oct 2017 20:59:37 +0000 (16 22:59 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Thu, 19 Oct 2017 19:06:24 +0000 (19 21:06 +0200)
tree15ddfb7de0f0f95a748558f1babfda09eee73e01
parent5bd784a872a64e6004ae80ca5aa17696e527b271
Use newer trash icon on Eclipse Photon or newer

Copy the SVG and PNGs from the eclipse.platform.images git repository
and rename them from "trash.*" to "trash_flat.*".

Add a version check for the first version of the "org.eclipse.ui"
bundle that uses the new icon to decide which one to use in EGit.
EGit UI has a hard (non-optional) dependency on org.eclipse.ui
anyway, so this version check is acceptable.

Since we have a reference to the "trash can" icon in plugin.xml,
add a property tester for this bundle version check and use it in
plugin.xml to display one or the other icon in the context menu
entry for the "Garbage Collect" command in the context menu of the
repository view.

This ensures that EGit uses a trash icon visually identical to the
one used by the platform on which EGit runs, and thus the user is
presented with a consistent UI.

Bug: 525600
Change-Id: I98c869b0b84677bc67575edd7358a0a17954727c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
icons/org.eclipse.egit.ui/icons/elcl16/trash_flat.svg [new file with mode: 0644]
org.eclipse.egit.ui/icons/elcl16/trash_flat.png [new file with mode: 0644]
org.eclipse.egit.ui/icons/elcl16/trash_flat@2x.png [new file with mode: 0644]
org.eclipse.egit.ui/plugin.xml
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIIcons.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/expressions/BundlePropertyTester.java [new file with mode: 0644]