Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 15982)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 15983)
@@ -47,8 +47,8 @@
 import org.openstreetmap.josm.gui.mappaint.MultiCascade;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition;
+import org.openstreetmap.josm.gui.mappaint.mapcss.Declaration;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Expression;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Instruction;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
-import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule.Declaration;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.MapCSSRuleIndex;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Declaration.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Declaration.java	(revision 15983)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Declaration.java	(revision 15983)
@@ -0,0 +1,65 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.mappaint.mapcss;
+
+import java.util.List;
+import java.util.Objects;
+
+import org.openstreetmap.josm.gui.mappaint.Environment;
+import org.openstreetmap.josm.gui.mappaint.StyleSource;
+import org.openstreetmap.josm.tools.Utils;
+
+/**
+ * A declaration is a list of {@link Instruction}s
+ */
+public class Declaration {
+    /**
+     * The instructions in this declaration
+     */
+    public final List<Instruction> instructions;
+    /**
+     * The index of this declaration
+     * <p>
+     * declarations in the StyleSource are numbered consecutively
+     */
+    public final int idx;
+
+    /**
+     * Create a new {@link Declaration}
+     * @param instructions The instructions for this declaration
+     * @param idx The index in the {@link StyleSource}
+     */
+    public Declaration(List<Instruction> instructions, int idx) {
+        this.instructions = Utils.toUnmodifiableList(instructions);
+        this.idx = idx;
+    }
+
+    /**
+     * <p>Executes the instructions against the environment {@code env}</p>
+     *
+     * @param env the environment
+     */
+    public void execute(Environment env) {
+        for (Instruction i : instructions) {
+            i.execute(env);
+        }
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(instructions, idx);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) return true;
+        if (obj == null || getClass() != obj.getClass()) return false;
+        Declaration that = (Declaration) obj;
+        return idx == that.idx &&
+                Objects.equals(instructions, that.instructions);
+    }
+
+    @Override
+    public String toString() {
+        return "Declaration [instructions=" + instructions + ", idx=" + idx + ']';
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java	(revision 15982)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java	(revision 15983)
@@ -16,5 +16,5 @@
  * For example a simple assignment like <code>width: 3;</code>, but may also
  * be a set instruction (<code>set highway;</code>).
- * A MapCSS {@link MapCSSRule.Declaration} is a list of instructions.
+ * A MapCSS {@link Declaration} is a list of instructions.
  */
 @FunctionalInterface
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 15982)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 15983)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyMatchType;
 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.Op;
+import org.openstreetmap.josm.gui.mappaint.mapcss.Declaration;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Expression;
 import org.openstreetmap.josm.gui.mappaint.mapcss.ExpressionFactory;
@@ -33,5 +34,4 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
-import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule.Declaration;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 15982)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 15983)
@@ -2,11 +2,7 @@
 package org.openstreetmap.josm.gui.mappaint.mapcss;
 
-import java.util.List;
-import java.util.Objects;
 import java.util.stream.Collectors;
 
 import org.openstreetmap.josm.gui.mappaint.Environment;
-import org.openstreetmap.josm.gui.mappaint.StyleSource;
-import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -27,60 +23,4 @@
      */
     public final Declaration declaration;
-
-    /**
-     * A declaration is a set of {@link Instruction}s
-     */
-    public static class Declaration {
-        /**
-         * The instructions in this declaration
-         */
-        public final List<Instruction> instructions;
-        /**
-         * The index of this declaration
-         * <p>
-         * declarations in the StyleSource are numbered consecutively
-         */
-        public final int idx;
-
-        /**
-         * Create a new {@link Declaration}
-         * @param instructions The instructions for this dectlaration
-         * @param idx The index in the {@link StyleSource}
-         */
-        public Declaration(List<Instruction> instructions, int idx) {
-            this.instructions = Utils.toUnmodifiableList(instructions);
-            this.idx = idx;
-        }
-
-        /**
-         * <p>Executes the instructions against the environment {@code env}</p>
-         *
-         * @param env the environment
-         */
-        public void execute(Environment env) {
-            for (Instruction i : instructions) {
-                i.execute(env);
-            }
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(instructions, idx);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (this == obj) return true;
-            if (obj == null || getClass() != obj.getClass()) return false;
-            Declaration that = (Declaration) obj;
-            return idx == that.idx &&
-                    Objects.equals(instructions, that.instructions);
-        }
-
-        @Override
-        public String toString() {
-            return "Declaration [instructions=" + instructions + ", idx=" + idx + ']';
-        }
-    }
 
     /**
