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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
;
15 import org
.eclipse
.core
.expressions
.PropertyTester
;
16 import org
.eclipse
.linuxtools
.tmf
.ui
.project
.model
.TmfExperimentElement
;
17 import org
.eclipse
.linuxtools
.tmf
.ui
.project
.model
.TmfTraceElement
;
20 * <b><u>TracePropertyTester</u></b>
23 public class TracePropertyTester
extends PropertyTester
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
29 private static String isExperimentTrace
= "isExperimentTrace"; //$NON-NLS-1$
31 // ------------------------------------------------------------------------
33 // ------------------------------------------------------------------------
38 public TracePropertyTester() {
41 // ------------------------------------------------------------------------
43 // ------------------------------------------------------------------------
46 * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
49 public boolean test(Object receiver
, String property
, Object
[] args
, Object expectedValue
) {
51 // Check if the parent of a trace element is an experiment
52 if (receiver
!= null && receiver
instanceof TmfTraceElement
) {
53 TmfTraceElement trace
= (TmfTraceElement
) receiver
;
54 if (isExperimentTrace
.equals(property
)) {
55 return trace
.getParent() instanceof TmfExperimentElement
;
This page took 0.03214 seconds and 5 git commands to generate.