analysis: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / views / callstack / AbstractCallStackAnalysis.java
1 /*******************************************************************************
2 * Copyright (c) 2014 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 * Patrick Tasse - Add methods to get attribute paths
12 *******************************************************************************/
13
14 package org.eclipse.tracecompass.tmf.ui.views.callstack;
15
16 import org.eclipse.tracecompass.tmf.core.callstack.CallStackStateProvider;
17 import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
18 import org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput;
19
20 /**
21 * The base classes for analyses who want to populate the CallStack View.
22 *
23 * @author Alexandre Montplaisir
24 */
25 public abstract class AbstractCallStackAnalysis extends TmfStateSystemAnalysisModule {
26
27 private static final String[] DEFAULT_THREADS_PATTERN =
28 new String[] { CallStackStateProvider.THREADS, "*" }; //$NON-NLS-1$;
29
30 private static final String[] DEFAULT_CALL_STACK_PATH =
31 new String[] { CallStackStateProvider.CALL_STACK };
32
33 /**
34 * Abstract constructor (should only be called via the sub-classes'
35 * constructors.
36 */
37 public AbstractCallStackAnalysis() {
38 super();
39 registerOutput(new TmfAnalysisViewOutput(CallStackView.ID));
40 }
41
42 /**
43 * Get the pattern of thread attributes. Override this method if the state
44 * system attributes do not match the default pattern defined by
45 * {@link CallStackStateProvider}.
46 *
47 * @return the absolute pattern of the thread attributes
48 */
49 public String[] getThreadsPattern() {
50 return DEFAULT_THREADS_PATTERN;
51 }
52
53 /**
54 * Get the call stack attribute path relative to a thread attribute found by
55 * {@link #getThreadsPattern()}. Override this method if the state system
56 * attributes do not match the default pattern defined by
57 * {@link CallStackStateProvider}.
58 *
59 * @return the relative path of the call stack attribute
60 */
61 public String[] getCallStackPath() {
62 return DEFAULT_CALL_STACK_PATH;
63 }
64 }
This page took 0.041323 seconds and 5 git commands to generate.