2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.ui.text.template;
7 import net.sourceforge.phpdt.internal.corext.template.Template;
9 import org.eclipse.jface.viewers.ILabelProviderListener;
10 import org.eclipse.jface.viewers.ITableLabelProvider;
11 import org.eclipse.swt.graphics.Image;
13 public class TemplateLabelProvider implements ITableLabelProvider {
16 * @see ITableLabelProvider#getColumnImage(Object, int)
18 public Image getColumnImage(Object element, int columnIndex) {
23 * @see ITableLabelProvider#getColumnText(Object, int)
25 public String getColumnText(Object element, int columnIndex) {
26 Template template = (Template) element;
28 switch (columnIndex) {
30 return template.getName();
32 return template.getContextTypeName();
34 return template.getDescription();
41 * @see IBaseLabelProvider#addListener(ILabelProviderListener)
43 public void addListener(ILabelProviderListener listener) {
47 * @see IBaseLabelProvider#dispose()
49 public void dispose() {
53 * @see IBaseLabelProvider#isLabelProperty(Object, String)
55 public boolean isLabelProperty(Object element, String property) {
60 * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
62 public void removeListener(ILabelProviderListener listener) {