Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-06-03 10:28:29 +0000
committerAlexander Kurtakov2013-06-03 14:47:18 +0000
commit17f3627c49b1c8f5a2fdacfdc044fd6e8320399d (patch)
tree5abf2fb4063b6fcd7971a0e364bd7970e3b6e79d
parent943b504fe7a7560dd8bbb93e927bb8fbcbbe801f (diff)
downloadorg.eclipse.linuxtools-17f3627c49b1c8f5a2fdacfdc044fd6e8320399d.tar.gz
org.eclipse.linuxtools-17f3627c49b1c8f5a2fdacfdc044fd6e8320399d.tar.xz
org.eclipse.linuxtools-17f3627c49b1c8f5a2fdacfdc044fd6e8320399d.zip
systemtap: IDataSetFilter remove IMemento usage.
This wasn't used anywhere so it's a code cleanup allowing to even drop org.eclipse.ui requires from graphingapi.core. Basic moreunit plugin settings to allow easy navigation between test and class under test are included. Change-Id: I514e6b0c945053c6c526ba8373e8ae522171739d Reviewed-on: https://git.eclipse.org/r/13489 Tested-by: Hudson CI Reviewed-by: Sami Wagiaalla <swagiaal@redhat.com> IP-Clean: Sami Wagiaalla <swagiaal@redhat.com> Tested-by: Sami Wagiaalla <swagiaal@redhat.com> Reviewed-on: https://git.eclipse.org/r/13499 Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> IP-Clean: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/MatchFilterTest.java10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/RangeFilterTest.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/SortFilterTest.java13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/UniqueFilterTest.java21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/.settings/org.moreunit.prefs4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/META-INF/MANIFEST.MF6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/IDataSetFilter.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/MatchFilter.java14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/RangeFilter.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/SortFilter.java13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/UniqueFilter.java19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/AvailableFilterTypes.java39
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java3
13 files changed, 28 insertions, 147 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/MatchFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/MatchFilterTest.java
index 25261ef2ea..b47e480d16 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/MatchFilterTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/MatchFilterTest.java
@@ -20,7 +20,6 @@ import java.util.ArrayList;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.MatchFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
import org.junit.Test;
public class MatchFilterTest {
@@ -55,7 +54,7 @@ public class MatchFilterTest {
assertEquals(data[2].get(3), data2[2].get(1));
assertEquals(data[2].get(6), data2[2].get(2));
assertEquals(data[2].get(9), data2[2].get(3));
-
+
filter = new MatchFilter(-1, "", MatchFilter.KEEP_MATCHING);
assertNull(filter.filter(data));
}
@@ -64,10 +63,5 @@ public class MatchFilterTest {
MatchFilter filter = new MatchFilter(0, "", MatchFilter.KEEP_MATCHING);
assertTrue(MatchFilter.ID.equals(filter.getID()));
}
- @Test
- public void testWriteXML() {
- MatchFilter filter = new MatchFilter(0, "", MatchFilter.KEEP_MATCHING);
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
+
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/RangeFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/RangeFilterTest.java
index 9e076e08fb..483e430e43 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/RangeFilterTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/RangeFilterTest.java
@@ -20,12 +20,11 @@ import java.util.ArrayList;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.RangeFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
import org.junit.Before;
import org.junit.Test;
public class RangeFilterTest {
-
+
@Before
public void setUp() {
filter = new RangeFilter(0, 1, 2, RangeFilter.INSIDE_BOUNDS | RangeFilter.INCLUSIVE);
@@ -109,7 +108,7 @@ public class RangeFilterTest {
assertEquals(data[2].get(1), data2[2].get(0));
assertEquals(data[2].get(4), data2[2].get(1));
assertEquals(data[2].get(7), data2[2].get(2));
-
+
filter = new RangeFilter(0, 0, 2, RangeFilter.OUTSIDE_BOUNDS);
data2 = filter.filter(data);
@@ -118,8 +117,8 @@ public class RangeFilterTest {
assertEquals(height, data[0].size());
assertEquals(width, data2.length);
assertEquals(0, data2[0].size());
-
-
+
+
filter = new RangeFilter(-1, 1, 3, 0);
assertNull(filter.filter(data));
}
@@ -127,10 +126,6 @@ public class RangeFilterTest {
public void testGetID() {
assertTrue(RangeFilter.ID.equals(filter.getID()));
}
- @Test
- public void testWriteXML() {
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
+
RangeFilter filter;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/SortFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/SortFilterTest.java
index 16b01a5b9a..cd7fb0d42b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/SortFilterTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/SortFilterTest.java
@@ -20,7 +20,6 @@ import java.util.ArrayList;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.SortFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
import org.junit.Before;
import org.junit.Test;
@@ -61,7 +60,7 @@ public class SortFilterTest {
assertEquals(data[2].get(6), data2[2].get(2));
assertEquals(data[2].get(9), data2[2].get(3));
-
+
filter = new SortFilter(0, SortFilter.DESCENDING);
data2 = filter.filter(data);
@@ -79,10 +78,10 @@ public class SortFilterTest {
assertEquals(data[2].get(5), data2[2].get(1));
assertEquals(data[2].get(8), data2[2].get(2));
assertEquals(data[2].get(9), data2[2].get(7));
-
+
filter = new SortFilter(-1, 0);
assertNull(filter.filter(data));
-
+
data[0].add("a");
data[0].add("a");
data[1].add("b");
@@ -94,10 +93,6 @@ public class SortFilterTest {
public void testGetID() {
assertTrue(SortFilter.ID.equals(filter.getID()));
}
- @Test
- public void testWriteXML() {
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
+
SortFilter filter;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/UniqueFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/UniqueFilterTest.java
index 1da54f4705..eac40a6a1e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/UniqueFilterTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core.tests/src/org/eclipse/linuxtools/systemtap/graphingapi/core/tests/filters/UniqueFilterTest.java
@@ -22,18 +22,17 @@ import org.eclipse.linuxtools.systemtap.graphingapi.core.aggregates.MaxAggregate
import org.eclipse.linuxtools.systemtap.graphingapi.core.aggregates.SumAggregate;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.UniqueFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
import org.junit.Before;
import org.junit.Test;
public class UniqueFilterTest {
@Before
public void setUp() {
- filter = new UniqueFilter(0, new SumAggregate(), 0);
+ filter = new UniqueFilter(0, new SumAggregate());
}
@Test
public void testUniqueFilter() {
- filter = new UniqueFilter(-1, new MaxAggregate(), 0);
+ filter = new UniqueFilter(-1, new MaxAggregate());
assertNotNull(filter);
}
@Test
@@ -47,7 +46,7 @@ public class UniqueFilterTest {
assertEquals(height, data[0].size());
ArrayList<Object>[] data2 = filter.filter(data);
-
+
assertEquals(width, data.length);
assertEquals(height, data[0].size());
assertEquals(width, data2.length);
@@ -59,29 +58,25 @@ public class UniqueFilterTest {
assertEquals(0, ((Number)data2[2].get(0)).intValue());
assertEquals(3, ((Number)data2[2].get(1)).intValue());
assertEquals(8, ((Number)data2[2].get(2)).intValue());
-
- filter = new UniqueFilter(-1, new SumAggregate(), 0);
+
+ filter = new UniqueFilter(-1, new SumAggregate());
assertNull(filter.filter(null));
data = MockDataSet.createArrayList(2, new Object());
data[0] = new ArrayList<Object>();
data[1] = new ArrayList<Object>();
-
+
data[0].add("a");
data[0].add("a");
data[1].add("b");
data[1].add("c");
- filter = new UniqueFilter(0, new SumAggregate(), 0);
+ filter = new UniqueFilter(0, new SumAggregate());
assertNotNull(filter.filter(data));
}
@Test
public void testGetID() {
assertTrue(UniqueFilter.ID.equals(filter.getID()));
}
- @Test
- public void testWriteXML() {
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
+
UniqueFilter filter;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/.settings/org.moreunit.prefs b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/.settings/org.moreunit.prefs
new file mode 100644
index 0000000000..6f1ed2b939
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/.settings/org.moreunit.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.moreunit.preferences.version=2
+org.moreunit.unitsourcefolder=org.eclipse.linuxtools.systemtap.graphingapi.core\:src\:org.eclipse.linuxtools.systemtap.graphingapi.core.tests\:src
+org.moreunit.useprojectsettings=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/META-INF/MANIFEST.MF
index 066103440b..7b4d1eb655 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/META-INF/MANIFEST.MF
@@ -13,8 +13,8 @@ Export-Package: org.eclipse.linuxtools.systemtap.graphingapi.core,
org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.table,
org.eclipse.linuxtools.systemtap.graphingapi.core.filters,
org.eclipse.linuxtools.systemtap.graphingapi.core.structures
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.structures
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.structures,
+ org.eclipse.swt
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/IDataSetFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/IDataSetFilter.java
index cf11220287..1e2a3dbf8c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/IDataSetFilter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/IDataSetFilter.java
@@ -13,10 +13,7 @@ package org.eclipse.linuxtools.systemtap.graphingapi.core.filters;
import java.util.ArrayList;
-import org.eclipse.ui.IMemento;
-
public interface IDataSetFilter {
public ArrayList<Object>[] filter(ArrayList<Object>[] data);
public String getID();
- public void writeXML(IMemento parent);
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/MatchFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/MatchFilter.java
index dcdddbc66d..3fe5407fdf 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/MatchFilter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/MatchFilter.java
@@ -14,7 +14,6 @@ package org.eclipse.linuxtools.systemtap.graphingapi.core.filters;
import java.util.ArrayList;
import org.eclipse.linuxtools.systemtap.structures.Copier;
-import org.eclipse.ui.IMemento;
@@ -54,19 +53,6 @@ public class MatchFilter implements IDataSetFilter {
return ID;
}
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- @Override
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID); //$NON-NLS-1$
- child.putInteger("column", column); //$NON-NLS-1$
- child.putString("value", value.toString()); //$NON-NLS-1$
- child.putInteger("style", style); //$NON-NLS-1$
- }
-
private int column;
private Object value;
private int style;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/RangeFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/RangeFilter.java
index a65d2314a2..e0fe243695 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/RangeFilter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/RangeFilter.java
@@ -15,7 +15,6 @@ import java.util.ArrayList;
import org.eclipse.linuxtools.systemtap.graphingapi.core.structures.NumberType;
import org.eclipse.linuxtools.systemtap.structures.Copier;
-import org.eclipse.ui.IMemento;
@@ -89,20 +88,6 @@ public class RangeFilter implements IDataSetFilter {
return true;
}
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- @Override
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID); //$NON-NLS-1$
- child.putInteger("column", column); //$NON-NLS-1$
- child.putString("low", lowerBound.toString()); //$NON-NLS-1$
- child.putString("high", upperBound.toString()); //$NON-NLS-1$
- child.putInteger("style", style); //$NON-NLS-1$
- }
-
private int column;
private Number upperBound;
private Number lowerBound;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/SortFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/SortFilter.java
index c2ff1fe894..0203c6da0b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/SortFilter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/SortFilter.java
@@ -17,7 +17,6 @@ import org.eclipse.linuxtools.systemtap.graphingapi.core.structures.NumberType;
import org.eclipse.linuxtools.systemtap.structures.Copier;
import org.eclipse.linuxtools.systemtap.structures.IndexedObject;
import org.eclipse.linuxtools.systemtap.structures.Sort;
-import org.eclipse.ui.IMemento;
@@ -70,18 +69,6 @@ public class SortFilter implements IDataSetFilter {
return ID;
}
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- @Override
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID); //$NON-NLS-1$
- child.putInteger("column", column); //$NON-NLS-1$
- child.putInteger("style", style); //$NON-NLS-1$
- }
-
private int column;
private int style;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/UniqueFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/UniqueFilter.java
index f208383d56..5580c1517c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/UniqueFilter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/filters/UniqueFilter.java
@@ -17,15 +17,12 @@ import org.eclipse.linuxtools.internal.systemtap.graphingapi.core.GraphingAPINon
import org.eclipse.linuxtools.systemtap.graphingapi.core.aggregates.IDataAggregate;
import org.eclipse.linuxtools.systemtap.graphingapi.core.structures.NumberType;
import org.eclipse.linuxtools.systemtap.structures.Copier;
-import org.eclipse.ui.IMemento;
-
public class UniqueFilter implements IDataSetFilter {
- public UniqueFilter(int column, IDataAggregate aggregate, int style) {
+ public UniqueFilter(int column, IDataAggregate aggregate) {
this.column = column;
this.aggregate = aggregate;
- this.style = style;
}
/**
@@ -92,21 +89,7 @@ public class UniqueFilter implements IDataSetFilter {
return ID;
}
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- @Override
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID); //$NON-NLS-1$
- child.putInteger("column", column); //$NON-NLS-1$
- child.putString("aggregate", aggregate.getID()); //$NON-NLS-1$
- child.putInteger("style", style); //$NON-NLS-1$
- }
-
private int column;
private IDataAggregate aggregate;
- private int style;
public static final String ID = "org.eclipse.linuxtools.systemtap.graphingapi.core.filters.UniqueFilter"; //$NON-NLS-1$
} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/AvailableFilterTypes.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/AvailableFilterTypes.java
index 034469ae0f..fe1c3e5c01 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/AvailableFilterTypes.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/AvailableFilterTypes.java
@@ -12,12 +12,10 @@
package org.eclipse.linuxtools.systemtap.graphingapi.ui.wizards.filter;
import org.eclipse.linuxtools.internal.systemtap.graphingapi.ui.Localization;
-import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.IDataSetFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.MatchFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.RangeFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.SortFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.UniqueFilter;
-import org.eclipse.ui.IMemento;
@@ -74,43 +72,6 @@ public final class AvailableFilterTypes {
return null;
}
- public static IDataSetFilter getDataSetFilter(IMemento xml) {
- String id = xml.getID();
- int column = xml.getInteger("column").intValue(); //$NON-NLS-1$
- int style;
-
- switch(getIndex(id)) {
- case 0:
- String val = xml.getString("value"); //$NON-NLS-1$
- style = xml.getInteger("style").intValue(); //$NON-NLS-1$
- return new MatchFilter(column, val, style);
- case 1:
- style = xml.getInteger("style").intValue(); //$NON-NLS-1$
- String l = xml.getString("low"); //$NON-NLS-1$
- String h = xml.getString("high"); //$NON-NLS-1$
-
- Number low, high;
- if(l.contains(".")) //$NON-NLS-1$
- low = Double.valueOf(l);
- else
- low = Long.valueOf(l);
- if(h.contains(".")) //$NON-NLS-1$
- high = Double.valueOf(h);
- else
- high = Long.valueOf(h);
-
- return new RangeFilter(column, low, high, style);
- case 2:
- style = xml.getInteger("style").intValue(); //$NON-NLS-1$
- return new SortFilter(column, style);
- case 3:
- String agg = xml.getString("aggregate"); //$NON-NLS-1$
- style = xml.getInteger("style").intValue(); //$NON-NLS-1$
- return new UniqueFilter(column, AggregateFactory.createAggregate(agg), style);
- }
- return null;
- }
-
private static int getIndex(String id) {
for(int i=0; i< filterIDs.length; i++) {
if(id.equals(filterIDs[i])) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java
index 4ba755bcd5..84b4c0a75b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java
@@ -95,12 +95,11 @@ public class UniqueFilterWizardPage extends FilterWizardPage {
@Override
protected void createFilter() {
int selected = cboColumn.getSelectionIndex();
- int style = 0;
if(selected >=0 && selected < cboColumn.getItemCount()) {
if(null != aggregateID && aggregateID.length() > 0) {
((SelectFilterWizard) super.getWizard()).filter = new UniqueFilter(
selected,
- AggregateFactory.createAggregate(aggregateID), style);
+ AggregateFactory.createAggregate(aggregateID));
}
}
}

Back to the top