lttng: Add a diagram showing the dependencies between plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / model / impl / TraceControlLabelProvider.java
CommitLineData
eb1bab5b 1/**********************************************************************
11252342
AM
2 * Copyright (c) 2012, 2013 Ericsson
3 *
eb1bab5b
BH
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
11252342
AM
8 *
9 * Contributors:
eb1bab5b
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
9315aeee 12package org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;
eb1bab5b
BH
13
14import org.eclipse.jface.viewers.ColumnLabelProvider;
115b4a01 15import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.ITraceControlComponent;
eb1bab5b
BH
16import org.eclipse.swt.graphics.Image;
17
18/**
eb1bab5b
BH
19 * <p>
20 * Label provider for trace control tree viewer.
21 * </p>
11252342 22 *
dbd4432d 23 * @author Bernd Hufmann
eb1bab5b
BH
24 */
25public class TraceControlLabelProvider extends ColumnLabelProvider {
26
27 // ------------------------------------------------------------------------
28 // Operations
29 // ------------------------------------------------------------------------
11252342 30
eb1bab5b
BH
31 @Override
32 public Image getImage(Object element) {
33 if ((element != null) && (element instanceof ITraceControlComponent)) {
34 return ((ITraceControlComponent) element).getImage();
35 }
36 return null;
37 }
38
eb1bab5b
BH
39 @Override
40 public String getText(Object element) {
41 if ((element != null) && (element instanceof ITraceControlComponent)) {
42 return ((ITraceControlComponent) element).getName();
43 }
44 return "";//$NON-NLS-1$
45 }
46
eb1bab5b
BH
47 @Override
48 public String getToolTipText(Object element) {
49 if ((element != null) && (element instanceof ITraceControlComponent)) {
50 return ((ITraceControlComponent) element).getToolTip();
51 }
52 return null;
53 }
54}
This page took 0.079718 seconds and 5 git commands to generate.