516804: Icons for user action entries

Added fontawesome icons to user action entries.

The background color actually looks fine on Windows, Mac and Ubuntu.
I'll leave it like that for now, and resolve the color selection as
part of theming support in bug 489034

Bug: 516804
See-Also: 489034
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=516804
diff --git a/org.eclipse.epp.mpc.ui/about.html b/org.eclipse.epp.mpc.ui/about.html
index d774b07..d014d8f 100644
--- a/org.eclipse.epp.mpc.ui/about.html
+++ b/org.eclipse.epp.mpc.ui/about.html
@@ -23,5 +23,20 @@
 indicated below, the terms and conditions of the EPL still apply to any source code in the Content
 and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
 
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties
+as set out below. If you did not receive this Content directly from
+the Eclipse Foundation, the following is provided for informational
+purposes only, and you should look to the Redistributor's license
+for terms and conditions of use.</p>
+
+<h4>FontAwesome 4.5.0</h4>
+
+<p>This plugin includes images created from rasterized glyphs from
+<a href="https://fortawesome.github.io/Font-Awesome/">Font Awesome
+4.5.0</a> at different resolutions.  FontAwesome is available under
+the <a href="http://scripts.sil.org/OFL">SIL Open Font License</a>.</p>
+
 </body>
 </html>
\ No newline at end of file
diff --git a/org.eclipse.epp.mpc.ui/icons/action-item-favorites.png b/org.eclipse.epp.mpc.ui/icons/action-item-favorites.png
new file mode 100644
index 0000000..ac12965
--- /dev/null
+++ b/org.eclipse.epp.mpc.ui/icons/action-item-favorites.png
Binary files differ
diff --git a/org.eclipse.epp.mpc.ui/icons/action-item-login.png b/org.eclipse.epp.mpc.ui/icons/action-item-login.png
new file mode 100644
index 0000000..e09e80d
--- /dev/null
+++ b/org.eclipse.epp.mpc.ui/icons/action-item-login.png
Binary files differ
diff --git a/org.eclipse.epp.mpc.ui/icons/action-item-warning.png b/org.eclipse.epp.mpc.ui/icons/action-item-warning.png
new file mode 100644
index 0000000..2349a2c
--- /dev/null
+++ b/org.eclipse.epp.mpc.ui/icons/action-item-warning.png
Binary files differ
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/MarketplaceClientUiPlugin.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/MarketplaceClientUiPlugin.java
index bf6fb35..e509b1a 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/MarketplaceClientUiPlugin.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/MarketplaceClientUiPlugin.java
@@ -82,6 +82,12 @@
 
 	public static final String DEFAULT_MARKETPLACE_ICON = "DEFAULT_MARKETPLACE_ICON"; //$NON-NLS-1$
 
+	public static final String ACTION_ICON_FAVORITES = "ACTION_ICON_FAVORITES"; //$NON-NLS-1$
+
+	public static final String ACTION_ICON_LOGIN = "ACTION_ICON_LOGIN"; //$NON-NLS-1$
+
+	public static final String ACTION_ICON_WARNING = "ACTION_ICON_WARNING"; //$NON-NLS-1$
+
 	public static final String ITEM_ICON_STAR = "ITEM_ICON_STAR"; //$NON-NLS-1$
 
 	public static final String ITEM_ICON_STAR_SELECTED = "ITEM_ICON_STAR_SELECTED"; //$NON-NLS-1$
@@ -189,6 +195,12 @@
 		imageRegistry.put(ITEM_ICON_STAR_SELECTED,
 				imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/star-selected.png")); //$NON-NLS-1$
 		imageRegistry.put(ITEM_ICON_SHARE, imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/share.png")); //$NON-NLS-1$
+		imageRegistry.put(ACTION_ICON_FAVORITES,
+				imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/action-item-favorites.png")); //$NON-NLS-1$
+		imageRegistry.put(ACTION_ICON_LOGIN,
+				imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/action-item-login.png")); //$NON-NLS-1$
+		imageRegistry.put(ACTION_ICON_WARNING,
+				imageDescriptorFromPlugin(getBundle().getSymbolicName(), "icons/action-item-warning.png")); //$NON-NLS-1$
 		return imageRegistry;
 	}
 
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractMarketplaceDiscoveryItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractMarketplaceDiscoveryItem.java
index 7f15be4..1f68bad 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractMarketplaceDiscoveryItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractMarketplaceDiscoveryItem.java
@@ -811,4 +811,14 @@
 		dataFactory.minSize(minWidth, SWT.DEFAULT);
 		return dataFactory;
 	}
+
+	protected static Icon createIcon(String path) {
+		Icon icon = new Icon();
+		icon.setImage128(path);
+		icon.setImage64(path);
+		icon.setImage32(path);
+		icon.setImage16(path);
+		return icon;
+	}
+
 }
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractUserActionItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractUserActionItem.java
index e808536..2f4be26 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractUserActionItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/AbstractUserActionItem.java
@@ -31,8 +31,6 @@
 	public AbstractUserActionItem(Composite parent, MarketplaceDiscoveryResources resources,
 			UserActionCatalogItem connector, CatalogViewer viewer) {
 		super(parent, SWT.NONE, resources, null, connector, viewer);
-		//TODO we need a better color definition for this...
-		//see https://bugs.eclipse.org/bugs/show_bug.cgi?id=516804
 		setBackground(viewer.getControl().getDisplay().getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
 	}
 
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/OpenFavoritesNotificationItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/OpenFavoritesNotificationItem.java
index a6f50b1..af3e79e 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/OpenFavoritesNotificationItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/OpenFavoritesNotificationItem.java
@@ -34,12 +34,7 @@
 	@Override
 	protected Icon getIcon() {
 		String path = REGISTRY_SCHEME + MarketplaceClientUiPlugin.DEFAULT_MARKETPLACE_ICON;
-		Icon icon = new Icon();
-		icon.setImage128(path);
-		icon.setImage64(path);
-		icon.setImage32(path);
-		icon.setImage16(path);
-		return icon;
+		return createIcon(path);
 	}
 
 	@Override
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/RetryErrorActionItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/RetryErrorActionItem.java
index a57fff0..aafdceb 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/RetryErrorActionItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/RetryErrorActionItem.java
@@ -12,6 +12,7 @@
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.epp.internal.mpc.core.MarketplaceClientCore;
+import org.eclipse.epp.internal.mpc.ui.MarketplaceClientUiPlugin;
 import org.eclipse.epp.internal.mpc.ui.catalog.UserActionCatalogItem;
 import org.eclipse.equinox.internal.p2.discovery.model.Icon;
 import org.eclipse.jface.dialogs.ErrorDialog;
@@ -47,8 +48,8 @@
 
 	@Override
 	protected Icon getIcon() {
-		// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=516804
-		return null;
+		String path = REGISTRY_SCHEME + MarketplaceClientUiPlugin.ACTION_ICON_WARNING;
+		return createIcon(path);
 	}
 
 	@Override
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesFindFavoritesActionItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesFindFavoritesActionItem.java
index f7e91d7..219f1e6 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesFindFavoritesActionItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesFindFavoritesActionItem.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.epp.internal.mpc.ui.wizards;
 
+import org.eclipse.epp.internal.mpc.ui.MarketplaceClientUiPlugin;
 import org.eclipse.epp.internal.mpc.ui.catalog.UserActionCatalogItem;
 import org.eclipse.epp.mpc.ui.CatalogDescriptor;
 import org.eclipse.equinox.internal.p2.discovery.model.Icon;
@@ -44,8 +45,8 @@
 
 	@Override
 	protected Icon getIcon() {
-		// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=516804
-		return null;
+		String path = REGISTRY_SCHEME + MarketplaceClientUiPlugin.ACTION_ICON_FAVORITES;
+		return createIcon(path);
 	}
 
 	@Override
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesSignInActionItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesSignInActionItem.java
index 3aa6bcc..6c126a2 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesSignInActionItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesSignInActionItem.java
@@ -11,6 +11,7 @@
 package org.eclipse.epp.internal.mpc.ui.wizards;
 
 import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.epp.internal.mpc.ui.MarketplaceClientUiPlugin;
 import org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog;
 import org.eclipse.epp.internal.mpc.ui.catalog.UserActionCatalogItem;
 import org.eclipse.equinox.internal.p2.discovery.model.Icon;
@@ -44,8 +45,8 @@
 
 	@Override
 	protected Icon getIcon() {
-		// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=516804
-		return null;
+		String path = REGISTRY_SCHEME + MarketplaceClientUiPlugin.ACTION_ICON_LOGIN;
+		return createIcon(path);
 	}
 
 	@Override
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesUnsupportedActionItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesUnsupportedActionItem.java
index ea061b7..e471b01 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesUnsupportedActionItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/UserFavoritesUnsupportedActionItem.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.epp.internal.mpc.ui.wizards;
 
+import org.eclipse.epp.internal.mpc.ui.MarketplaceClientUiPlugin;
 import org.eclipse.epp.internal.mpc.ui.catalog.UserActionCatalogItem;
 import org.eclipse.equinox.internal.p2.discovery.model.Icon;
 import org.eclipse.swt.widgets.Composite;
@@ -36,8 +37,8 @@
 
 	@Override
 	protected Icon getIcon() {
-		// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=516804
-		return null;
+		String path = REGISTRY_SCHEME + MarketplaceClientUiPlugin.ACTION_ICON_WARNING;
+		return createIcon(path);
 	}
 
 	@Override