Index: /trunk/scripts/TagInfoExtract.java
===================================================================
--- /trunk/scripts/TagInfoExtract.java	(revision 15983)
+++ /trunk/scripts/TagInfoExtract.java	(revision 15984)
@@ -394,5 +394,5 @@
                 for (MapCSSRule r : styleSource.rules) {
                     env.clearSelectorMatchingInformation();
-                    if (r.selector.matches(env)) {
+                    if (r.matches(env)) {
                         // ignore selector range
                         if (env.layer == null) {
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 15983)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 15984)
@@ -702,5 +702,5 @@
             MapCSSRule r = candidates.next();
             env.clearSelectorMatchingInformation();
-            if (r.selector.matches(env)) { // as side effect env.parent will be set (if s is a child selector)
+            if (r.matches(env)) { // as side effect env.parent will be set (if s is a child selector)
                 TagCheck check = indexData.getCheck(r);
                 if (check != null) {
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 15983)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 15984)
@@ -35,7 +35,21 @@
 
     /**
+     * Test whether the selector of this rule applies to the primitive.
+     *
+     * @param env the Environment. env.mc and env.layer are read-only when matching a selector.
+     * env.source is not needed. This method will set the matchingReferrers field of env as
+     * a side effect! Make sure to clear it before invoking this method.
+     * @return true, if the selector applies
+     * @see Selector#matches
+     */
+    public boolean matches(Environment env) {
+        return selector.matches(env);
+    }
+
+    /**
      * <p>Executes the instructions against the environment {@code env}</p>
      *
      * @param env the environment
+     * @see Declaration#execute
      */
     public void execute(Environment env) {
Index: /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 15983)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 15984)
@@ -452,5 +452,5 @@
         assertEquals(1, source.rules.size());
         Environment e = new Environment(n, new MultiCascade(), Environment.DEFAULT_LAYER, null);
-        assertTrue(source.rules.get(0).selector.matches(e));
+        assertTrue(source.rules.get(0).matches(e));
         source.rules.get(0).declaration.execute(e);
         assertEquals("x2;x10", e.getCascade(Environment.DEFAULT_LAYER).get("refs", null, String.class));
@@ -467,5 +467,5 @@
         assertEquals(1, source.rules.size());
         Environment e = new Environment(way1, new MultiCascade(), Environment.DEFAULT_LAYER, null);
-        assertTrue(source.rules.get(0).selector.matches(e));
+        assertTrue(source.rules.get(0).matches(e));
         source.rules.get(0).declaration.execute(e);
         assertEquals(Functions.join(",", "Alpha", "Beta"), e.getCascade(Environment.DEFAULT_LAYER).get("sorted", null, String.class));
@@ -474,5 +474,5 @@
         source.loadStyleSource();
         e = new Environment(way1, new MultiCascade(), Environment.DEFAULT_LAYER, null);
-        assertTrue(source.rules.get(0).selector.matches(e));
+        assertTrue(source.rules.get(0).matches(e));
         source.rules.get(0).declaration.execute(e);
         assertEquals(Functions.join(",", "A8", "A9"), e.getCascade(Environment.DEFAULT_LAYER).get("sorted", null, String.class));
@@ -532,5 +532,5 @@
         assertEquals(1, source.rules.size());
         e = new Environment(rel1, new MultiCascade(), Environment.DEFAULT_LAYER, null);
-        assertTrue(source.rules.get(0).selector.matches(e));
+        assertTrue(source.rules.get(0).matches(e));
         source.rules.get(0).declaration.execute(e);
         assertEquals((Integer) 1, e.getCascade(Environment.DEFAULT_LAYER).get("roles", null, Integer.class));
