Search in sources :

Example 1 with TmfTreeDataModelStub

use of org.eclipse.tracecompass.tmf.tests.stubs.model.tree.TmfTreeDataModelStub in project tracecompass by tracecompass.

the class TmfTreeModelTest method initClass.

/**
 * Run once
 */
@BeforeClass
public static void initClass() {
    for (int i = 0; i < NB_COLUMNS; i++) {
        String headerText = HEADER_PREFIX + String.valueOf(i);
        String headerTooltip = TOOLTIP_PREFIX + String.valueOf(i);
        fTestHeaders.add(headerText);
        fExpectedEmptyTooltips.add("");
        fExpectedTooltips.add(headerTooltip);
        TableColumnDescriptor.Builder descBuilder = new TableColumnDescriptor.Builder();
        descBuilder.setText(headerText);
        descBuilder.setTooltip(headerTooltip);
        fTestDescriptors.add(descBuilder.build());
    }
    for (int k = 0; k < NB_ROWS; k++) {
        List<String> labels = new ArrayList<>();
        for (int i = 0; i < NB_COLUMNS; i++) {
            labels.add(LABEL_PREFIX + String.valueOf(i));
        }
        ITmfTreeDataModel dataModel = new TmfTreeDataModelStub(k, PARENT_ID, labels);
        fTestEntries.add(dataModel);
    }
}
Also used : ITmfTreeDataModel(org.eclipse.tracecompass.tmf.core.model.tree.ITmfTreeDataModel) TmfTreeDataModelStub(org.eclipse.tracecompass.tmf.tests.stubs.model.tree.TmfTreeDataModelStub) ArrayList(java.util.ArrayList) TableColumnDescriptor(org.eclipse.tracecompass.internal.provisional.tmf.core.model.TableColumnDescriptor) ITableColumnDescriptor(org.eclipse.tracecompass.tmf.core.model.ITableColumnDescriptor) BeforeClass(org.junit.BeforeClass)

Aggregations

ArrayList (java.util.ArrayList)1 TableColumnDescriptor (org.eclipse.tracecompass.internal.provisional.tmf.core.model.TableColumnDescriptor)1 ITableColumnDescriptor (org.eclipse.tracecompass.tmf.core.model.ITableColumnDescriptor)1 ITmfTreeDataModel (org.eclipse.tracecompass.tmf.core.model.tree.ITmfTreeDataModel)1 TmfTreeDataModelStub (org.eclipse.tracecompass.tmf.tests.stubs.model.tree.TmfTreeDataModelStub)1 BeforeClass (org.junit.BeforeClass)1