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
25 public abstract class AbstractCallStackAnalysis
extends TmfStateSystemAnalysisModule
{
27 private static final String
[] DEFAULT_THREADS_PATTERN
=
28 new String
[] { CallStackStateProvider
.THREADS
, "*" }; //$NON-NLS-1$;
30 private static final String
[] DEFAULT_CALL_STACK_PATH
=
31 new String
[] { CallStackStateProvider
.CALL_STACK
};
34 * Abstract constructor (should only be called via the sub-classes'
37 public AbstractCallStackAnalysis() {
39 registerOutput(new TmfAnalysisViewOutput(CallStackView
.ID
));
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}.
47 * @return the absolute pattern of the thread attributes
49 public String
[] getThreadsPattern() {
50 return DEFAULT_THREADS_PATTERN
;
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}.
59 * @return the relative path of the call stack attribute
61 public String
[] getCallStackPath() {
62 return DEFAULT_CALL_STACK_PATH
;