control: Base code for profile dialog window
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui / src / org / eclipse / tracecompass / internal / lttng2 / control / ui / views / dialogs / ConnectionTreeLabelProvider.java
1 /**********************************************************************
2 * Copyright (c) 2015 École Polytechnique de Montréal
3 *
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
8 *
9 * Contributors:
10 * Patrick-Jeffrey Pollo Guilbert, William Enright,
11 * William Tri-Khiem Truong - Initial API and implementation
12 **********************************************************************/
13
14 package org.eclipse.tracecompass.internal.lttng2.control.ui.views.dialogs;
15
16 import org.eclipse.jface.viewers.LabelProvider;
17 import org.eclipse.remote.core.IRemoteConnection;
18 import org.eclipse.remote.core.IRemoteConnectionType;
19 import org.eclipse.swt.graphics.Image;
20 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.messages.Messages;
21
22 /**
23 * TODO
24 *
25 */
26 public final class ConnectionTreeLabelProvider extends LabelProvider {
27 @Override
28 public String getText(Object element) {
29 if (element instanceof IRemoteConnection) {
30 IRemoteConnection rc = (IRemoteConnection) element;
31 return rc.getName();
32 } else if (element instanceof IRemoteConnectionType) {
33 IRemoteConnectionType rs = (IRemoteConnectionType) element;
34 return rs.getName();
35 }
36 return Messages.TraceControl_UnknownNode;
37 }
38
39 @Override
40 public Image getImage(Object element) {
41 // if (element instanceof IRemoteConnection) {
42 // return Activator.getDefault().loadIcon(NewConnectionDialog.CONNECTION_ICON_FILE);
43 // }
44 // return Activator.getDefault().loadIcon(NewConnectionDialog.PROVIDERS_ICON_FILE);
45 return null;
46 }
47 }
This page took 0.034345 seconds and 5 git commands to generate.