Commit | Line | Data |
---|---|---|
1841657e GB |
1 | /******************************************************************************* |
2 | * Copyright (c) 2016 É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 | ||
10 | package org.eclipse.tracecompass.tmf.ui.views.callstack; | |
11 | ||
12 | import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule; | |
13 | import org.eclipse.tracecompass.tmf.core.analysis.ITmfNewAnalysisModuleListener; | |
14 | import org.eclipse.tracecompass.tmf.core.callstack.CallStackAnalysis; | |
15 | import org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput; | |
16 | ||
17 | /** | |
18 | * Registers the {@link CallStackView} to {@link CallStackAnalysis}. The | |
19 | * analysis being an abstract class, it is not possible to use the output | |
20 | * extension to add the view, but the listener fixes the issue. | |
21 | * | |
22 | * @author Geneviève Bastien | |
23 | * @since 2.1 | |
24 | */ | |
25 | public class CallStackAnalysisListener implements ITmfNewAnalysisModuleListener { | |
26 | ||
27 | @Override | |
28 | public void moduleCreated(IAnalysisModule module) { | |
29 | if (module instanceof CallStackAnalysis) { | |
30 | module.registerOutput(new TmfAnalysisViewOutput(CallStackView.ID)); | |
31 | } | |
32 | } | |
33 | ||
34 | } |