use of org.eclipse.tracecompass.tmf.ui.views.ITmfPinnable in project tracecompass by tracecompass.
the class TmfChartView method setPinned.
@Override
public void setPinned(@Nullable ITmfTrace trace) {
TmfViewer leftViewer = getLeftChildViewer();
if (leftViewer instanceof ITmfPinnable) {
((ITmfPinnable) leftViewer).setPinned(trace);
}
ITmfPinnable chartViewer = getChartViewer();
if (chartViewer != null) {
chartViewer.setPinned(trace);
}
if (trace != null) {
/* Ignore relevant inbound signals */
TmfSignalManager.addIgnoredInboundSignal(this, TmfTraceOpenedSignal.class);
TmfSignalManager.addIgnoredInboundSignal(this, TmfTraceSelectedSignal.class);
// $NON-NLS-1$
setPartName(String.format("%s <%s>", fOriginalTabLabel, TmfTraceManager.getInstance().getTraceUniqueName(trace)));
} else {
/* Handle relevant inbound signals */
TmfSignalManager.removeIgnoredInboundSignal(this, TmfTraceOpenedSignal.class);
TmfSignalManager.removeIgnoredInboundSignal(this, TmfTraceSelectedSignal.class);
setPartName(fOriginalTabLabel);
}
if (fPinAction != null) {
fPinAction.setPinnedTrace(trace);
}
}
Aggregations