Opened 19 years ago
Closed 18 years ago
#127 closed enhancement (wontfix)
Why was addSelectionChangedListener removed?
| Reported by: | Owned by: | imi | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | unspecified | Version: | |
| Keywords: | Cc: |
Description
I was using addSelectionChangedListener() however it got removed at some point. Presumably now people are required to manipulate the list themselves. That means that if you want a plugin to work across the current and stable version you need something like:
try { Main.ds.addSelectionChangedListener(this); }
catch( NoSuchMethodError e )
{
try {
java.lang.reflect.Field f = DataSet.class.getDeclaredField("listeners");
((Collection<SelectionChangedListener>)f.get(Main.ds)).add(this);
} catch (Exception x) { System.out.println( e ); }
}
Which isn't pretty. Could you leave the functions in a little longer until a stable release has the new way public (the other way around requires trapping the security error and falling back to the function...)



I think the policy "Releases are stable as they don't change anyway" and "JOSM-Latest is not stable as it is not a release but a beta after the release" sounds quite normal to me.
Note, that you can now upload links to http://josm.openstreetmap.de/wiki/Plugins/LatestRelease to point to versions, that only work with the latest release version (means: josm.jar, not josm-release.jar).