1 /**********************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
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
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.model
.impl
;
14 import org
.eclipse
.jface
.viewers
.ColumnLabelProvider
;
15 import org
.eclipse
.swt
.graphics
.Image
;
16 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.ui
.views
.model
.ITraceControlComponent
;
20 * Label provider for trace control tree viewer.
23 * @author Bernd Hufmann
25 public class TraceControlLabelProvider
extends ColumnLabelProvider
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
32 public Image
getImage(Object element
) {
33 if ((element
!= null) && (element
instanceof ITraceControlComponent
)) {
34 return ((ITraceControlComponent
) element
).getImage();
40 public String
getText(Object element
) {
41 if ((element
!= null) && (element
instanceof ITraceControlComponent
)) {
42 return ((ITraceControlComponent
) element
).getName();
44 return "";//$NON-NLS-1$
48 public String
getToolTipText(Object element
) {
49 if ((element
!= null) && (element
instanceof ITraceControlComponent
)) {
50 return ((ITraceControlComponent
) element
).getToolTip();