summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-08-12 06:24:21 (EDT)
committerSteffen Pingel2011-08-12 08:51:58 (EDT)
commit6226bce8845ab418aba0c7678e3f3884e8eed458 (patch)
tree1e0f7f1cfea5b92f24b63ffa3f3764dd170c0073
parent92ac1db65f9b6c0b41af5e8a542f14a0f24eaf1c (diff)
downloadorg.eclipse.mylyn.reviews-6226bce8845ab418aba0c7678e3f3884e8eed458.zip
org.eclipse.mylyn.reviews-6226bce8845ab418aba0c7678e3f3884e8eed458.tar.gz
org.eclipse.mylyn.reviews-6226bce8845ab418aba0c7678e3f3884e8eed458.tar.bz2
bug 354570: [patch] Show content-type icons in patch set section
-rw-r--r--gerrit/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/ReviewItemLabelProvider.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/gerrit/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/ReviewItemLabelProvider.java b/gerrit/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/ReviewItemLabelProvider.java
index ef9cb52..3d8567d 100644
--- a/gerrit/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/ReviewItemLabelProvider.java
+++ b/gerrit/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/ReviewItemLabelProvider.java
@@ -17,14 +17,13 @@ import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelP
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.StyledString.Styler;
+import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImageManger;
import org.eclipse.mylyn.reviews.core.model.IFileItem;
import org.eclipse.mylyn.reviews.core.model.IReviewItem;
import org.eclipse.mylyn.reviews.core.model.ITopic;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.TextStyle;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.internal.WorkbenchImages;
/**
* @author Steffen Pingel
@@ -37,13 +36,23 @@ public class ReviewItemLabelProvider extends LabelProvider implements IStyledLab
}
};
+ private final CommonImageManger imageManager;
+
public ReviewItemLabelProvider() {
+ imageManager = new CommonImageManger();
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ imageManager.dispose();
}
@Override
public Image getImage(Object element) {
if (element instanceof IReviewItem) {
- return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE);
+ IReviewItem item = (IReviewItem) element;
+ return imageManager.getFileImage(item.getName());
}
return null;
}