Commit | Line | Data |
---|---|---|
12c155f5 | 1 | /******************************************************************************* |
339d539c | 2 | * Copyright (c) 2010, 2014 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 | |
339d539c | 11 | * Patrick Tasse - Add support for folder elements |
12c155f5 FC |
12 | *******************************************************************************/ |
13 | ||
14 | package org.eclipse.linuxtools.tmf.ui.project.model; | |
15 | ||
12c155f5 | 16 | import org.eclipse.jface.viewers.LabelProvider; |
12c155f5 FC |
17 | |
18 | /** | |
339d539c | 19 | * Label provider implementation for trace folders for viewers that display |
b544077e | 20 | * the content of a trace folder. |
12c155f5 | 21 | * <p> |
c8422608 | 22 | * |
b544077e | 23 | * @version 1.0 |
c8422608 | 24 | * @author Francois Chouinard |
12c155f5 | 25 | */ |
339d539c | 26 | public class TraceFolderLabelProvider extends LabelProvider { |
12c155f5 FC |
27 | |
28 | @Override | |
339d539c | 29 | public String getText(Object element) { |
12c155f5 FC |
30 | if (element instanceof TmfTraceElement) { |
31 | TmfTraceElement entry = (TmfTraceElement) element; | |
339d539c | 32 | return entry.getElementPath(); |
12c155f5 FC |
33 | } |
34 | return null; | |
35 | } | |
36 | ||
37 | } |