Index: trunk/scripts/taginfoextract.groovy
===================================================================
--- trunk/scripts/taginfoextract.groovy	(revision 9283)
+++ trunk/scripts/taginfoextract.groovy	(revision 9289)
@@ -22,4 +22,5 @@
 import org.openstreetmap.josm.data.coor.LatLon
 import org.openstreetmap.josm.data.osm.Node
+import org.openstreetmap.josm.data.osm.OsmPrimitive
 import org.openstreetmap.josm.data.osm.Way
 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings
@@ -34,5 +35,7 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector
 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser
+import org.openstreetmap.josm.gui.mappaint.styleelement.AreaElement
 import org.openstreetmap.josm.gui.mappaint.styleelement.LineElement
+import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement
 import org.openstreetmap.josm.gui.preferences.map.TaggingPresetPreference
 import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset
@@ -52,6 +55,6 @@
     MapCSSStyleSource style_source
     FileWriter output_file
-    def base_dir = "."
-    def tags = [] as Set
+    String base_dir = "."
+    Set tags = []
 
     private def cached_svnrev
@@ -63,5 +66,5 @@
 
         def tag
-        def osm
+        OsmPrimitive osm
 
         Checker(tag) {
@@ -69,9 +72,9 @@
         }
 
-        def apply_stylesheet(osm) {
+        Environment apply_stylesheet(OsmPrimitive osm) {
             osm.put(tag[0], tag[1])
-            def mc = new MultiCascade()
-
-            def env = new Environment(osm, mc, null, style_source)
+            MultiCascade mc = new MultiCascade()
+
+            Environment env = new Environment(osm, mc, null, style_source)
             for (def r in style_source.rules) {
                 env.clearSelectorMatchingInformation()
@@ -89,8 +92,8 @@
 
         /**
-         * Create image file from ElemStyle.
+         * Create image file from StyleElement.
          * @return the URL
          */
-        def create_image(elem_style, type, nc) {
+        def create_image(StyleElement elem_style, type, nc) {
             def img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB)
             def g = img.createGraphics()
@@ -142,6 +145,6 @@
             def n1 = new Node(nc.getLatLon(2,8))
             def n2 = new Node(nc.getLatLon(14,8))
-            osm.addNode(n1)
-            osm.addNode(n2)
+            ((Way)osm).addNode(n1)
+            ((Way)osm).addNode(n2)
             def env = apply_stylesheet(osm)
             def les = LineElement.createLine(env)
@@ -165,11 +168,11 @@
             def n3 = new Node(nc.getLatLon(14,14))
             def n4 = new Node(nc.getLatLon(2,14))
-            osm.addNode(n1)
-            osm.addNode(n2)
-            osm.addNode(n3)
-            osm.addNode(n4)
-            osm.addNode(n1)
+            ((Way)osm).addNode(n1)
+            ((Way)osm).addNode(n2)
+            ((Way)osm).addNode(n3)
+            ((Way)osm).addNode(n4)
+            ((Way)osm).addNode(n1)
             def env = apply_stylesheet(osm)
-            def aes = AreaElemStyle.create(env)
+            def aes = AreaElement.create(env)
             if (aes != null) {
                 if (!generate_image) return true
@@ -389,5 +392,5 @@
      * Determine full image url (can refer to JOSM or OSM repository).
      */
-    def find_image_url(path) {
+    def find_image_url(String path) {
         def f = new File("${base_dir}/images/styles/standard/${path}")
         if (f.exists()) {
