Skip to content

Instantly share code, notes, and snippets.

@RafalR
Created January 8, 2016 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RafalR/243c29ac9ed789a56372 to your computer and use it in GitHub Desktop.
Save RafalR/243c29ac9ed789a56372 to your computer and use it in GitHub Desktop.
var System = java.lang.System;
var SelectionChangedListener = org.openstreetmap.josm.data.SelectionChangedListener;
var DataSet = org.openstreetmap.josm.data.osm.DataSet;
var SelectionAdapter = {
init: function() {
DataSet.addSelectionListener(this);
},
selectionChanged: function (newSelection) {
System.out.println(newSelection);
}
}
var s = new SelectionChangedListener(SelectionAdapter);
s.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment