Index: /trunk/src/org/openstreetmap/josm/data/osm/Tagged.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Tagged.java	(revision 17875)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Tagged.java	(revision 17876)
@@ -6,4 +6,5 @@
 import java.util.Map;
 import java.util.Objects;
+import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -234,4 +235,14 @@
     }
 
+
+    /**
+     * Returns a Tagged instance for the given tag collection
+     * @param tags the tag collection
+     * @return a Tagged instance for the given tag collection
+     */
+    static Tagged ofTags(Collection<Tag> tags) {
+        return ofMap(tags.stream().collect(Collectors.toMap(Tag::getKey, Tag::getValue, (a, b) -> a)));
+    }
+
     /**
      * Returns a Tagged instance for the given tag map
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java	(revision 17875)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupport.java	(revision 17876)
@@ -4,4 +4,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
+import org.openstreetmap.josm.data.osm.Tagged;
 import org.openstreetmap.josm.data.osm.search.SearchCompiler;
 import org.openstreetmap.josm.gui.tagging.presets.items.KeyedItem;
@@ -107,5 +108,6 @@
     @Override
     public boolean evaluateCondition(SearchCompiler.Match condition) {
-        throw new UnsupportedOperationException();
+        Tagged tagged = Tagged.ofTags(changedTagsSupplier.get());
+        return condition.match(tagged);
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupportTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupportTest.java	(revision 17875)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupportTest.java	(revision 17876)
@@ -37,4 +37,5 @@
     void testTemplate() throws Exception {
         ArrayList<Tag> tags = new ArrayList<>(Arrays.asList(
+                new Tag("route", "bus"),
                 new Tag("name", "xxx"),
                 new Tag("from", "Foo"),
@@ -46,4 +47,6 @@
         TemplateEntry templateEntry = new TemplateParser("Bus {ref}: {from} -> {to}").parse();
         assertEquals("Bus 42: Foo -> Bar", templateEntry.getText(support));
+        templateEntry = new TemplateParser("?{route=train 'Train'|route=bus 'Bus'|'X'} {ref}: {from} -> {to}").parse();
+        assertEquals("Bus 42: Foo -> Bar", templateEntry.getText(support));
     }
 }
