Index: trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.groovy	(revision 8809)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.groovy	(revision 8811)
@@ -5,4 +5,5 @@
 import org.openstreetmap.josm.JOSMFixture
 import org.openstreetmap.josm.TestUtils
+import org.openstreetmap.josm.actions.search.SearchAction
 import org.openstreetmap.josm.actions.search.SearchCompiler
 import org.openstreetmap.josm.data.osm.Relation
@@ -26,4 +27,11 @@
     }
 
+    static def regexpSearch(String search) {
+        def setting = new SearchAction.SearchSetting()
+        setting.text = search
+        setting.regexSearch = true
+        return setting
+    }
+
     @Test
     public void testCreate1() {
@@ -37,5 +45,5 @@
     public void testCreate2() {
         def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
-        def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1 OR ref:1.1.", false, false))
+        def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1 OR ref:1.1."))
         def mp = CreateMultipolygonAction.createMultipolygonCommand(ways as Collection<Way>, null)
         assert getRefToRoleMap(mp.b).toString() == "[1:outer, 1.1.1:inner, 1.1.2:inner]"
@@ -45,9 +53,9 @@
     public void testUpdate1() {
         def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
-        def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=\".*1\$\"", false, true))
+        def ways = Utils.filter(ds.getWays(), SearchCompiler.compile(regexpSearch("ref=\".*1\$\"")))
         def mp = CreateMultipolygonAction.createMultipolygonCommand(ways as Collection<Way>, null)
         assert mp.b.getMembersCount() == 3
         assert getRefToRoleMap(mp.b).toString() == "[1:outer, 1.1:inner, 1.1.1:outer]"
-        def ways2 = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1.2", false, true))
+        def ways2 = Utils.filter(ds.getWays(), SearchCompiler.compile(regexpSearch("ref=1.2")))
         def mp2 = CreateMultipolygonAction.createMultipolygonCommand(ways2 as Collection<Way>, mp.b)
         assert mp2.b.getMembersCount() == 4
@@ -58,8 +66,8 @@
     public void testUpdate2() {
         def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null);
-        def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1 OR ref:1.1.1", false, false))
+        def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1 OR ref:1.1.1"))
         def mp = CreateMultipolygonAction.createMultipolygonCommand(ways as Collection<Way>, null)
         assert getRefToRoleMap(mp.b).toString() == "[1:outer, 1.1.1:inner]"
-        def ways2 = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1.1 OR ref=1.2 OR ref=1.1.2", false, true))
+        def ways2 = Utils.filter(ds.getWays(), SearchCompiler.compile(regexpSearch("ref=1.1 OR ref=1.2 OR ref=1.1.2")))
         def mp2 = CreateMultipolygonAction.createMultipolygonCommand(ways2 as Collection<Way>, mp.b)
         assert getRefToRoleMap(mp2.b).toString() == "[1:outer, 1.1:inner, 1.1.1:outer, 1.1.2:outer, 1.2:inner]"
Index: trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 8809)
+++ trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 8811)
@@ -31,5 +31,5 @@
     @Test
     public void testAny() throws Exception {
-        final SearchCompiler.Match c = SearchCompiler.compile("foo", false, false);
+        final SearchCompiler.Match c = SearchCompiler.compile("foo");
         Assert.assertTrue(c.match(newPrimitive("foobar", "true")));
         Assert.assertTrue(c.match(newPrimitive("name", "hello-foo-xy")));
@@ -39,5 +39,5 @@
     @Test
     public void testEquals() throws Exception {
-        final SearchCompiler.Match c = SearchCompiler.compile("foo=bar", false, false);
+        final SearchCompiler.Match c = SearchCompiler.compile("foo=bar");
         Assert.assertFalse(c.match(newPrimitive("foobar", "true")));
         Assert.assertTrue(c.match(newPrimitive("foo", "bar")));
@@ -48,5 +48,5 @@
     @Test
     public void testCompare() throws Exception {
-        final SearchCompiler.Match c1 = SearchCompiler.compile("start_date>1950", false, false);
+        final SearchCompiler.Match c1 = SearchCompiler.compile("start_date>1950");
         Assert.assertTrue(c1.match(newPrimitive("start_date", "1950-01-01")));
         Assert.assertTrue(c1.match(newPrimitive("start_date", "1960")));
@@ -54,5 +54,5 @@
         Assert.assertFalse(c1.match(newPrimitive("start_date", "1000")));
         Assert.assertTrue(c1.match(newPrimitive("start_date", "101010")));
-        final SearchCompiler.Match c2 = SearchCompiler.compile("start_date<1960", false, false);
+        final SearchCompiler.Match c2 = SearchCompiler.compile("start_date<1960");
         Assert.assertTrue(c2.match(newPrimitive("start_date", "1950-01-01")));
         Assert.assertFalse(c2.match(newPrimitive("start_date", "1960")));
@@ -60,8 +60,8 @@
         Assert.assertTrue(c2.match(newPrimitive("start_date", "1000")));
         Assert.assertTrue(c2.match(newPrimitive("start_date", "200")));
-        final SearchCompiler.Match c3 = SearchCompiler.compile("name<I", false, false);
+        final SearchCompiler.Match c3 = SearchCompiler.compile("name<I");
         Assert.assertTrue(c3.match(newPrimitive("name", "Alpha")));
         Assert.assertFalse(c3.match(newPrimitive("name", "Sigma")));
-        final SearchCompiler.Match c4 = SearchCompiler.compile("\"start_date\"<1960", false, false);
+        final SearchCompiler.Match c4 = SearchCompiler.compile("\"start_date\"<1960");
         Assert.assertTrue(c4.match(newPrimitive("start_date", "1950-01-01")));
         Assert.assertFalse(c4.match(newPrimitive("start_date", "2000")));
@@ -83,17 +83,17 @@
         way.addNode(node1);
         way.addNode(node2);
-        Assert.assertFalse(SearchCompiler.compile("nth:2", false, false).match(node1));
-        Assert.assertTrue(SearchCompiler.compile("nth:1", false, false).match(node1));
-        Assert.assertFalse(SearchCompiler.compile("nth:0", false, false).match(node1));
-        Assert.assertTrue(SearchCompiler.compile("nth:0", false, false).match(node0));
-        Assert.assertTrue(SearchCompiler.compile("nth:2", false, false).match(node2));
-        Assert.assertTrue(SearchCompiler.compile("nth:-1", false, false).match(node2));
-        Assert.assertTrue(SearchCompiler.compile("nth:-2", false, false).match(node1));
-        Assert.assertTrue(SearchCompiler.compile("nth:-3", false, false).match(node0));
+        Assert.assertFalse(SearchCompiler.compile("nth:2").match(node1));
+        Assert.assertTrue(SearchCompiler.compile("nth:1").match(node1));
+        Assert.assertFalse(SearchCompiler.compile("nth:0").match(node1));
+        Assert.assertTrue(SearchCompiler.compile("nth:0").match(node0));
+        Assert.assertTrue(SearchCompiler.compile("nth:2").match(node2));
+        Assert.assertTrue(SearchCompiler.compile("nth:-1").match(node2));
+        Assert.assertTrue(SearchCompiler.compile("nth:-2").match(node1));
+        Assert.assertTrue(SearchCompiler.compile("nth:-3").match(node0));
     }
 
     @Test
     public void testNthParseNegative() throws Exception {
-        Assert.assertThat(SearchCompiler.compile("nth:-1", false, false).toString(), CoreMatchers.is("Nth{nth=-1, modulo=false}"));
+        Assert.assertThat(SearchCompiler.compile("nth:-1").toString(), CoreMatchers.is("Nth{nth=-1, modulo=false}"));
 
     }
Index: trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java	(revision 8809)
+++ trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java	(revision 8811)
@@ -61,5 +61,5 @@
 
     private static Match compile(String expression) throws org.openstreetmap.josm.actions.search.SearchCompiler.ParseError {
-        return SearchCompiler.compile(expression, false, false);
+        return SearchCompiler.compile(expression);
     }
 
