summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDariusz Luksza2010-05-22 08:18:03 (EDT)
committer Chris Aniszczyk2010-05-23 20:10:34 (EDT)
commit650702404a06f86bce81b1d105ffc70ec429f9cf (patch)
treedade703ba4ce1ef9d5ffcc3cd57a8fe4302c598d
parent14cae3d9a9f1035fe0fa5c97ac0d8814c9ae61e8 (diff)
downloadegit-650702404a06f86bce81b1d105ffc70ec429f9cf.zip
egit-650702404a06f86bce81b1d105ffc70ec429f9cf.tar.gz
egit-650702404a06f86bce81b1d105ffc70ec429f9cf.tar.bz2
Add tag icon for tags in tag list in CrateTagDialogrefs/changes/36/736/3
Adds tag icon for each tag that is in 'Existing tags' list in CreateTagDialog. Change-Id: Ib11cdcc7df976368fa64d6d26a5de339864cb57e Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java
index 6bc6031..a2ffdf5 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/CreateTagDialog.java
@@ -11,6 +11,7 @@ package org.eclipse.egit.ui.internal.dialogs;
import java.util.List;
import java.util.regex.Pattern;
+import org.eclipse.egit.ui.UIIcons;
import org.eclipse.egit.ui.UIText;
import org.eclipse.egit.ui.UIUtils;
import org.eclipse.jface.dialogs.Dialog;
@@ -19,6 +20,9 @@ import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.resource.StringConverter;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -142,14 +146,21 @@ public class CreateTagDialog extends Dialog {
class TagLabelProvider extends WorkbenchLabelProvider implements
ITableLabelProvider {
+ private final ResourceManager fImageCache = new LocalResourceManager(JFaceResources
+ .getResources());
+
public Image getColumnImage(Object element, int columnIndex) {
- return null;
+ return fImageCache.createImage(UIIcons.TAG);
}
public String getColumnText(Object element, int columnIndex) {
return ((Tag) element).getTag();
}
+ public void dispose() {
+ fImageCache.dispose();
+ }
+
}
/**