1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.state
.resource
;
14 import org
.eclipse
.linuxtools
.lttng
.TraceDebug
;
15 import org
.eclipse
.linuxtools
.lttng
.model
.LTTngTreeNodeGeneric
;
16 import org
.eclipse
.linuxtools
.lttng
.state
.resource
.ILTTngStateResource
.GlobalStateMode
;
22 public class LTTngStateResource
extends
23 LTTngTreeNodeGeneric
<LTTngStateResource
> {
25 // ========================================================================
27 // =======================================================================
28 private GlobalStateMode fstateMode
= GlobalStateMode
.LTT_STATEMODE_UNKNOWN
;
29 private final ILttngStateContext fcontext
;
31 // ======================================================================+
33 // =======================================================================
35 public LTTngStateResource(Long id
, LTTngStateResource parent
, String name
,
36 ILttngStateContext context
, Object value
) {
37 super(id
, parent
, name
, value
);
41 public LTTngStateResource(Long id
, String name
, ILttngStateContext context
,
43 super(id
, name
, value
);
47 // ========================================================================
49 // =======================================================================
54 * org.eclipse.linuxtools.lttng.control.LTTngStateTreeNodeGeneric#getChildren
58 public LTTngStateResource
[] getChildren() {
59 return childrenToArray(fchildren
.values(), this.getClass());
66 * org.eclipse.linuxtools.lttng.state.resource.ILTTngStateResource#getStateMode
69 public GlobalStateMode
getStateMode() {
76 public void setStateMode(GlobalStateMode stateMode
) {
77 if (stateMode
!= null) {
78 fstateMode
= stateMode
;
80 TraceDebug
.debug("Received input is null !"); //$NON-NLS-1$
88 * org.eclipse.linuxtools.lttng.state.resource.ILTTngStateResource#getContext
91 public ILttngStateContext
getContext() {