lttng: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.ust.ui / src / org / eclipse / tracecompass / lttng2 / ust / ui / analysis / callstack / LttngUstCallStackAnalysis.java
1 /*******************************************************************************
2 * Copyright (c) 2014, 2015 Ericsson
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 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.lttng2.ust.ui.analysis.callstack;
14
15 import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
16
17 import org.eclipse.tracecompass.internal.lttng2.ust.core.callstack.LttngUstCallStackProvider;
18 import org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace;
19 import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
20 import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
21 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
22 import org.eclipse.tracecompass.tmf.ui.views.callstack.AbstractCallStackAnalysis;
23
24 /**
25 * Call-stack analysis to populate the TMF CallStack View from UST cyg-profile
26 * events.
27 *
28 * @author Alexandre Montplaisir
29 */
30 public class LttngUstCallStackAnalysis extends AbstractCallStackAnalysis {
31
32 /**
33 * @since 1.0
34 */
35 @Override
36 public boolean setTrace(ITmfTrace trace) throws TmfAnalysisException {
37 if (!(trace instanceof LttngUstTrace)) {
38 return false;
39 }
40 return super.setTrace(trace);
41 }
42
43 @Override
44 protected LttngUstTrace getTrace() {
45 return (LttngUstTrace) super.getTrace();
46 }
47
48 @Override
49 protected ITmfStateProvider createStateProvider() {
50 return new LttngUstCallStackProvider(checkNotNull(getTrace()));
51 }
52
53 }
This page took 0.031996 seconds and 5 git commands to generate.