1 /**********************************************************************
2 * Copyright (c) 2013 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 **********************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.impl
;
15 import org
.eclipse
.core
.expressions
.PropertyTester
;
19 * Property Tester Implementation for Trace Control Components.
21 * @author Bernd Hufmann
23 public class TraceControlPropertyTester
extends PropertyTester
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
28 private static final String ADD_CONTEXT_SUPPORT_PROPERTY
= "isAddContextOnEventSupported"; //$NON-NLS-1$
32 public boolean test(Object receiver
, String property
, Object
[] args
, Object expectedValue
) {
34 // Check if node supports adding contexts on event level.
35 if (ADD_CONTEXT_SUPPORT_PROPERTY
.equals(property
)) {
36 if ((receiver
!= null) && (receiver
instanceof TraceEventComponent
)) {
37 TraceEventComponent event
= (TraceEventComponent
) receiver
;
38 TargetNodeComponent node
= event
.getTargetNode();
39 return node
.isContextOnEventSupported();