| /******************************************************************************* |
| * Copyright (c) 2009, 2018 IBM Corporation and others. |
| * This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.wst.xsl.ui.internal.wizards; |
| |
| import org.eclipse.jface.text.templates.Template; |
| import org.eclipse.jface.viewers.ITableLabelProvider; |
| import org.eclipse.jface.viewers.LabelProvider; |
| import org.eclipse.swt.graphics.Image; |
| |
| class TemplateLabelProvider extends LabelProvider implements ITableLabelProvider |
| { |
| public Image getColumnImage(Object element, int columnIndex) |
| { |
| return null; |
| } |
| |
| public String getColumnText(Object element, int columnIndex) |
| { |
| Template template = (Template) element; |
| |
| switch (columnIndex) |
| { |
| case 0: |
| return template.getName(); |
| case 1: |
| return template.getDescription(); |
| default: |
| return ""; //$NON-NLS-1$ |
| } |
| } |
| } |