1 /*******************************************************************************
2 * Copyright (c) 2014 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 * Alexandre Montplaisir - Initial API and implementation
11 * Patrick Tasse - Add methods to get attribute paths
12 *******************************************************************************/
14 package org
.eclipse
.tracecompass
.tmf
.ui
.views
.callstack
;
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
;
21 * The base classes for analyses who want to populate the CallStack View.
23 * @author Alexandre Montplaisir
26 public abstract class AbstractCallStackAnalysis
extends TmfStateSystemAnalysisModule
{
28 private static final String
[] DEFAULT_THREADS_PATTERN
=
29 new String
[] { CallStackStateProvider
.THREADS
, "*" }; //$NON-NLS-1$;
31 private static final String
[] DEFAULT_CALL_STACK_PATH
=
32 new String
[] { CallStackStateProvider
.CALL_STACK
};
35 * Abstract constructor (should only be called via the sub-classes'
38 public AbstractCallStackAnalysis() {
40 registerOutput(new TmfAnalysisViewOutput(CallStackView
.ID
));
44 * Get the pattern of thread attributes. Override this method if the state
45 * system attributes do not match the default pattern defined by
46 * {@link CallStackStateProvider}.
48 * @return the absolute pattern of the thread attributes
51 public String
[] getThreadsPattern() {
52 return DEFAULT_THREADS_PATTERN
;
56 * Get the call stack attribute path relative to a thread attribute found by
57 * {@link #getThreadsPattern()}. Override this method if the state system
58 * attributes do not match the default pattern defined by
59 * {@link CallStackStateProvider}.
61 * @return the relative path of the call stack attribute
64 public String
[] getCallStackPath() {
65 return DEFAULT_CALL_STACK_PATH
;