Search in sources :

Example 1 with ISegmentAspect

use of org.eclipse.tracecompass.tmf.core.segment.ISegmentAspect in project tracecompass by tracecompass.

the class AbstractSegmentStoreTableViewer method createProviderColumns.

/**
 * Create columns specific to the provider
 */
protected void createProviderColumns() {
    if (!fColumnsCreated) {
        ISegmentStoreProvider provider = getSegmentProvider();
        if (provider != null) {
            for (final ISegmentAspect aspect : provider.getSegmentAspects()) {
                createColumn(aspect.getName(), new SegmentStoreTableColumnLabelProvider() {

                    @Override
                    public String getTextForSegment(ISegment input) {
                        return NonNullUtils.nullToEmptyString(aspect.resolve(input));
                    }
                }, aspect.getComparator());
            }
        }
        fColumnsCreated = true;
    }
}
Also used : ISegmentAspect(org.eclipse.tracecompass.tmf.core.segment.ISegmentAspect) ISegmentStoreProvider(org.eclipse.tracecompass.analysis.timing.core.segmentstore.ISegmentStoreProvider) ISegment(org.eclipse.tracecompass.segmentstore.core.ISegment)

Aggregations

ISegmentStoreProvider (org.eclipse.tracecompass.analysis.timing.core.segmentstore.ISegmentStoreProvider)1 ISegment (org.eclipse.tracecompass.segmentstore.core.ISegment)1 ISegmentAspect (org.eclipse.tracecompass.tmf.core.segment.ISegmentAspect)1