2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.ui.text.template;
7 import org.eclipse.swt.graphics.Image;
9 import org.eclipse.jface.viewers.ILabelProviderListener;
10 import org.eclipse.jface.viewers.ITableLabelProvider;
12 import net.sourceforge.phpdt.internal.corext.template.Template;
14 public class TemplateLabelProvider implements ITableLabelProvider {
17 * @see ITableLabelProvider#getColumnImage(Object, int)
19 public Image getColumnImage(Object element, int columnIndex) {
24 * @see ITableLabelProvider#getColumnText(Object, int)
26 public String getColumnText(Object element, int columnIndex) {
27 Template template = (Template) element;
29 switch (columnIndex) {
31 return template.getName();
33 return template.getContextTypeName();
35 return template.getDescription();
42 * @see IBaseLabelProvider#addListener(ILabelProviderListener)
44 public void addListener(ILabelProviderListener listener) {
48 * @see IBaseLabelProvider#dispose()
50 public void dispose() {
54 * @see IBaseLabelProvider#isLabelProperty(Object, String)
56 public boolean isLabelProperty(Object element, String property) {
61 * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
63 public void removeListener(ILabelProviderListener listener) {