TMF: Specify if an analysis applies differently to an experiment
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core.tests / stubs / org / eclipse / tracecompass / tmf / tests / stubs / analysis / TestAnalysis2.java
1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 École Polytechnique de Montréal
3 *
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
8 *
9 * Contributors:
10 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.tests.stubs.analysis;
14
15 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
17 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
18 import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
19 import org.eclipse.tracecompass.tmf.tests.stubs.trace.TmfTraceStub2;
20
21 /**
22 * Simple analysis type for test
23 */
24 public class TestAnalysis2 extends TmfAbstractAnalysisModule {
25
26 @Override
27 public boolean canExecute(ITmfTrace trace) {
28 /* This just makes sure the trace is or contains a trace stub 2 */
29 for (ITmfTrace aTrace : TmfTraceManager.getTraceSet(trace)) {
30 if (TmfTraceStub2.class.isAssignableFrom(aTrace.getClass())) {
31 return true;
32 }
33 }
34 return false;
35 }
36
37 @Override
38 protected void canceling() {
39
40 }
41
42 @Override
43 protected boolean executeAnalysis(final IProgressMonitor monitor) {
44 return false;
45 }
46
47 }
This page took 0.038882 seconds and 5 git commands to generate.