Commit | Line | Data |
---|---|---|
12c155f5 | 1 | /******************************************************************************* |
11252342 | 2 | * Copyright (c) 2010, 2013 Ericsson |
c8422608 | 3 | * |
12c155f5 FC |
4 | * All rights reserved. This program and the accompanying materials are |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
c8422608 | 8 | * |
12c155f5 FC |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui.project.model; | |
14 | ||
15 | import org.eclipse.jface.viewers.ITableLabelProvider; | |
16 | import org.eclipse.jface.viewers.LabelProvider; | |
17 | import org.eclipse.swt.graphics.Image; | |
18 | ||
19 | /** | |
b544077e BH |
20 | * Label provider implementation for trace folders for tree viewers that display |
21 | * the content of a trace folder. | |
12c155f5 | 22 | * <p> |
c8422608 | 23 | * |
b544077e | 24 | * @version 1.0 |
c8422608 | 25 | * @author Francois Chouinard |
12c155f5 FC |
26 | */ |
27 | public class TraceFolderLabelProvider extends LabelProvider implements ITableLabelProvider { | |
28 | ||
29 | @Override | |
30 | public Image getColumnImage(Object element, int columnIndex) { | |
31 | return null; | |
32 | } | |
33 | ||
34 | @Override | |
35 | public String getColumnText(Object element, int columnIndex) { | |
36 | if (element instanceof TmfTraceElement) { | |
37 | TmfTraceElement entry = (TmfTraceElement) element; | |
38 | switch (columnIndex) { | |
39 | case 0: | |
40 | return entry.getName(); | |
41 | default: | |
42 | return null; | |
43 | } | |
44 | } | |
45 | return null; | |
46 | } | |
47 | ||
48 | } |