1 /**********************************************************************
2 * Copyright (c) 2012 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
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
;
14 import org
.eclipse
.core
.commands
.ExecutionException
;
15 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
16 import org
.eclipse
.core
.runtime
.NullProgressMonitor
;
17 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.ITraceControlComponent
;
20 * <b><u>TraceSessionGroup</u></b>
22 * Implementation of the trace session group.
25 public class TraceSessionGroup
extends TraceControlComponent
{
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 * Path to icon file for this component.
32 public static final String TRACE_SESSIONS_ICON_FILE
= "icons/obj16/sessions.gif"; //$NON-NLS-1$
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
38 // ------------------------------------------------------------------------
40 // ------------------------------------------------------------------------
43 * @param name - the name of the component.
44 * @param parent - the parent of this component.
46 public TraceSessionGroup(String name
, ITraceControlComponent parent
) {
48 setImage(TRACE_SESSIONS_ICON_FILE
);
51 // ------------------------------------------------------------------------
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
57 // ------------------------------------------------------------------------
59 * Retrieves the sessions information from the node.
60 * @throws ExecutionException
62 public void getSessionsFromNode() throws ExecutionException
{
63 getSessionsFromNode(new NullProgressMonitor());
67 * Retrieves the sessions information from the node.
68 * @param monitor - a progress monitor
69 * @throws ExecutionException
71 public void getSessionsFromNode(IProgressMonitor monitor
) throws ExecutionException
{
72 String
[] sessionNames
= getControlService().getSessionNames(monitor
);
73 for (int i
= 0; i
< sessionNames
.length
; i
++) {
74 TraceSessionComponent session
= new TraceSessionComponent(sessionNames
[i
], this);
76 session
.getConfigurationFromNode(monitor
);