Search in sources :

Example 6 with IDataEntry

use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry in project linuxtools by eclipse.

the class FilteredRowDataSet method rebuildDataSet.

// End IFilteredDataSet Methods
private void rebuildDataSet() {
    IDataEntry top = original.getEntry(original.getEntryCount() - 1);
    if (filtersChanged || dataCount != original.getRowCount() || topData != top) {
        dataCount = original.getRowCount();
        topData = top;
        List<Object>[] filterData = getFilterData();
        for (int i = 0; i < filters.size(); i++) {
            filterData = filters.get(i).filter(filterData);
        }
        setFilteredData(filterData);
    }
}
Also used : IDataEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry) List(java.util.List) ArrayList(java.util.ArrayList)

Example 7 with IDataEntry

use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry in project linuxtools by eclipse.

the class FilteredTableDataSet method rebuildDataSet.

// End IFilteredDataSet Methods
private void rebuildDataSet() {
    IDataEntry top = original.getEntry(original.getEntryCount() - 1);
    if (filtersChanged || dataCount != original.getRowCount() || topData != top || historical) {
        dataCount = original.getRowCount();
        topData = top;
        historical = false;
        List<Object>[] filterData = getFilterData();
        for (int i = 0; i < filters.size(); i++) {
            filterData = filters.get(i).filter(filterData);
        }
        setFilteredData(filterData);
    }
}
Also used : IDataEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry) List(java.util.List) ArrayList(java.util.ArrayList)

Example 8 with IDataEntry

use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry in project linuxtools by eclipse.

the class RowDataSetTest method testRemove.

@Test
public void testRemove() {
    assertFalse(data.remove(null));
    assertFalse(data.remove(new RowEntry()));
    assertFalse(data.remove(-1));
    assertFalse(data.remove(10));
    assertEquals(2, data.getEntryCount());
    IDataEntry entry = data.getEntry(0);
    assertTrue(data.remove(entry));
    assertEquals(1, data.getEntryCount());
    assertFalse(data.remove(entry));
    assertTrue(data.remove(0));
}
Also used : IDataEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry) RowEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.RowEntry) Test(org.junit.Test)

Example 9 with IDataEntry

use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry in project linuxtools by eclipse.

the class RowEntryTest method testCopy.

@Test
public void testCopy() {
    IDataEntry entry2 = entry.copy();
    assertEquals(entry2.getRowCount(), entry.getRowCount());
    assertEquals(entry2.getColCount(), entry.getColCount());
    assertSame(entry2.getRow(0)[1], entry.getRow(0)[1]);
}
Also used : IDataEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry) Test(org.junit.Test)

Example 10 with IDataEntry

use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry in project linuxtools by eclipse.

the class TableDataSetTest method testRemove.

@Test
public void testRemove() {
    assertFalse(data.remove(null));
    assertFalse(data.remove(new TableEntry()));
    assertFalse(data.remove(-1));
    assertFalse(data.remove(10));
    assertEquals(2, data.getEntryCount());
    IDataEntry entry = data.getEntry(0);
    assertTrue(data.remove(entry));
    assertEquals(1, data.getEntryCount());
    assertFalse(data.remove(entry));
    assertTrue(data.remove(0));
}
Also used : TableEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry) IDataEntry(org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry) Test(org.junit.Test)

Aggregations

IDataEntry (org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataEntry)10 Test (org.junit.Test)7 RowEntry (org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.RowEntry)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 File (java.io.File)1 IOException (java.io.IOException)1 ImportDataSetHandler (org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ImportDataSetHandler)1 IFilteredDataSet (org.eclipse.linuxtools.systemtap.graphing.core.datasets.IFilteredDataSet)1 FilteredRowDataSet (org.eclipse.linuxtools.systemtap.graphing.core.datasets.row.FilteredRowDataSet)1 TableEntry (org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry)1 Point (org.eclipse.swt.graphics.Point)1