summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-07-15 20:44:45 (EDT)
committerSteffen Pingel2011-07-15 20:44:45 (EDT)
commit1f883168b002a29591dc0dfd1287ee1b412d58ab (patch)
tree101f2f8372149035be0d005d412bf04b477b152d
parent87b4e872c9ee5febe78c79b154b8709af4a638e6 (diff)
downloadorg.eclipse.mylyn.builds-1f883168b002a29591dc0dfd1287ee1b412d58ab.zip
org.eclipse.mylyn.builds-1f883168b002a29591dc0dfd1287ee1b412d58ab.tar.gz
org.eclipse.mylyn.builds-1f883168b002a29591dc0dfd1287ee1b412d58ab.tar.bz2
NEW - bug 352259: [patch] Show content-type icons in Artifacts section
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352259
-rw-r--r--org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/editor/ArtifactsLabelProvider.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/editor/ArtifactsLabelProvider.java b/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/editor/ArtifactsLabelProvider.java
index 106ee70..2b47994 100644
--- a/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/editor/ArtifactsLabelProvider.java
+++ b/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/editor/ArtifactsLabelProvider.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Tasktop Technologies - initial API and implementation
+ * GitHub - fix for bug 352259
*******************************************************************************/
package org.eclipse.mylyn.internal.builds.ui.editor;
@@ -17,6 +18,7 @@ import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.StyledString.Styler;
import org.eclipse.mylyn.builds.core.IArtifact;
import org.eclipse.mylyn.internal.builds.ui.editor.ArtifactsPart.ArtifactFolder;
+import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImageManger;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.TextStyle;
import org.eclipse.ui.ISharedImages;
@@ -24,6 +26,7 @@ import org.eclipse.ui.internal.WorkbenchImages;
/**
* @author Steffen Pingel
+ * @author Kevin Sawicki
*/
public class ArtifactsLabelProvider extends LabelProvider implements IStyledLabelProvider {
@@ -33,7 +36,16 @@ public class ArtifactsLabelProvider extends LabelProvider implements IStyledLabe
}
};
+ private final CommonImageManger imageManager;
+
public ArtifactsLabelProvider() {
+ imageManager = new CommonImageManger();
+ }
+
+ @Override
+ public void dispose() {
+ imageManager.dispose();
+ super.dispose();
}
@Override
@@ -41,7 +53,7 @@ public class ArtifactsLabelProvider extends LabelProvider implements IStyledLabe
if (element instanceof ArtifactFolder) {
return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FOLDER);
} else if (element instanceof IArtifact) {
- return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE);
+ return imageManager.getFileImage(((IArtifact) element).getName());
}
return null;
}