Changeset 25083 in osm for applications/editors/josm/plugins/scripting/scripts/HelloWorld.groovy
- Timestamp:
- 2011-01-16T19:47:42+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/scripting/scripts/HelloWorld.groovy
r25071 r25083 1 /* 2 * HelloWorld.groovy - displays the number of actually open layers 3 */ 1 4 import javax.swing.JOptionPane; 2 5 import org.openstreetmap.josm.Main; 3 6 7 def numlayers = Main.main?.map?.mapView?.numLayers 8 if (numlayers == null) numlayers = 0 4 9 5 JOptionPane.showMessageDialog(Main.parent, "[Groovy] Hello World!") 10 JOptionPane.showMessageDialog(Main.parent, "[Groovy] Hello World!\nYou have ${numlayers} layer(s).")
Note:
See TracChangeset
for help on using the changeset viewer.
