/*******************************************************************************
* Copyright (c) 2016 École Polytechnique de Montréal
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.tracecompass.tmf.ui.views.callstack;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
import org.eclipse.tracecompass.tmf.core.analysis.ITmfNewAnalysisModuleListener;
import org.eclipse.tracecompass.tmf.core.callstack.CallStackAnalysis;
import org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput;
/**
* Registers the {@link CallStackView} to {@link CallStackAnalysis}. The
* analysis being an abstract class, it is not possible to use the output
* extension to add the view, but the listener fixes the issue.
*
* @author Geneviève Bastien
* @since 2.2
*/
public class CallStackAnalysisListener implements ITmfNewAnalysisModuleListener {
@Override
public void moduleCreated(IAnalysisModule module) {
if (module instanceof CallStackAnalysis) {
module.registerOutput(new TmfAnalysisViewOutput(CallStackView.ID));
}
}
}