1 /*******************************************************************************
2 * Copyright (c) 2011 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
12 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng
.ui
.tracecontrol
.model
.config
;
15 import org
.eclipse
.jface
.viewers
.IStructuredContentProvider
;
16 import org
.eclipse
.jface
.viewers
.Viewer
;
17 import org
.eclipse
.linuxtools
.lttng
.core
.tracecontrol
.model
.config
.TraceChannels
;
20 * <b><u>TraceChannelTableContentProvider</u></b>
22 * IStructuredContentProvider implementation for TableViewers in order to provide the content of a table
23 * used for displaying and configuring trace channel information.
26 public class TraceChannelTableContentProvider
implements IStructuredContentProvider
{
28 // ------------------------------------------------------------------------
30 // -----------------------------------------------------------------------
32 // ------------------------------------------------------------------------
34 // -----------------------------------------------------------------------
36 // ------------------------------------------------------------------------
38 // -----------------------------------------------------------------------
41 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
44 public void dispose() {
49 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
52 public void inputChanged(Viewer viewer
, Object oldInput
, Object newInput
) {
57 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
60 public Object
[] getElements(Object inputElement
) {
61 if (inputElement
instanceof TraceChannels
) {
62 return ((TraceChannels
)inputElement
).values().toArray();