Search in sources :

Example 1 with TmfAnalysisViewOutput

use of org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput in project tracecompass by tracecompass.

the class TmfAnalysisOutputElement method getIcon.

@Override
public Image getIcon() {
    if (fOutput instanceof TmfAnalysisViewOutput) {
        IViewDescriptor descr = PlatformUI.getWorkbench().getViewRegistry().find(((TmfAnalysisViewOutput) fOutput).getViewId());
        if (descr != null) {
            Activator bundle = Activator.getDefault();
            String key = descr.getId();
            Image icon = bundle.getImageRegistry().get(key);
            if (icon == null) {
                icon = descr.getImageDescriptor().createImage();
                bundle.getImageRegistry().put(key, icon);
            }
            if (icon != null) {
                return icon;
            }
        }
    }
    return TmfProjectModelIcons.DEFAULT_VIEW_ICON;
}
Also used : IViewDescriptor(org.eclipse.ui.views.IViewDescriptor) Activator(org.eclipse.tracecompass.internal.tmf.ui.Activator) Image(org.eclipse.swt.graphics.Image) TmfAnalysisViewOutput(org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput)

Example 2 with TmfAnalysisViewOutput

use of org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput in project tracecompass by tracecompass.

the class TmfAnalysisOutputElement method getOutpuProperties.

private Map<String, String> getOutpuProperties() {
    Map<String, String> properties = new HashMap<>();
    IAnalysisOutput output = fOutput;
    if (output instanceof TmfAnalysisViewOutput) {
        properties.put(Messages.TmfAnalysisOutputElement_ViewIdProperty, ((TmfAnalysisViewOutput) output).getViewId());
    }
    return properties;
}
Also used : HashMap(java.util.HashMap) IAnalysisOutput(org.eclipse.tracecompass.tmf.core.analysis.IAnalysisOutput) TmfAnalysisViewOutput(org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput)

Example 3 with TmfAnalysisViewOutput

use of org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput in project tracecompass by tracecompass.

the class CallStackAnalysisListener method moduleCreated.

@Override
public void moduleCreated(@Nullable IAnalysisModule module) {
    if (module instanceof CallStackAnalysis) {
        module.registerOutput(new TmfAnalysisViewOutput(FlameChartView.ID));
        module.registerOutput(new TmfAnalysisViewOutput(FlameGraphView.ID));
        module.registerOutput(new TmfAnalysisViewOutput(CallGraphDensityView.ID));
        module.registerOutput(new TmfAnalysisViewOutput(CallGraphStatisticsView.ID));
    }
}
Also used : TmfAnalysisViewOutput(org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput) CallStackAnalysis(org.eclipse.tracecompass.analysis.profiling.core.callstack.CallStackAnalysis)

Aggregations

TmfAnalysisViewOutput (org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput)3 HashMap (java.util.HashMap)1 Image (org.eclipse.swt.graphics.Image)1 CallStackAnalysis (org.eclipse.tracecompass.analysis.profiling.core.callstack.CallStackAnalysis)1 Activator (org.eclipse.tracecompass.internal.tmf.ui.Activator)1 IAnalysisOutput (org.eclipse.tracecompass.tmf.core.analysis.IAnalysisOutput)1 IViewDescriptor (org.eclipse.ui.views.IViewDescriptor)1