Hi Vincent,

Thank you for cleaning up the source code. Of course I run into a problem
when using the scripting plugin.

How can I get all the selected elements?

This is what worked untill a few days ago:

from org.openstreetmap.josm import Main

editLayer = Main.getLayerManager().getEditLayer()
if editLayer and editLayer.data:
    selectedElements = editLayer.data.getSelected()

I tried a few incantations, but no luck.

Cheers,

Polyglot


2017-11-28 1:07 GMT+01:00 Vincent Privat <vincent.pri...@gmail.com>:

> First batch of deprecated APIs removed:
> https://josm.openstreetmap.de/changeset/13173/josm
> Cheers,
> Vincent
>
> 2017-11-26 16:42 GMT+01:00 Vincent Privat <vincent.pri...@gmail.com>:
>
> > Hello,
> > JOSM 13170 has been released. This is the last stable version before we
> > remove a lot of deprecated APIs.
> > Make sure your plugins compile without deprecation warning!
> > Vincent
> >
> > 2017-10-30 21:20 GMT+01:00 Vincent Privat <vincent.pri...@gmail.com>:
> >
> >> Hi Holger,
> >> Sorry for not responding earlier, but I have already updated a lot of
> >> plugins, see https://github.com/openstreetmap/josm-plugins/
> commits/master
> >> Still some work to do (around 1100 deprecation warnings)
> >> Cheers,
> >> Vincent
> >>
> >> 2017-10-30 21:16 GMT+01:00 Holger Mappt <holger...@gmx.net>:
> >>
> >>> On 2017-10-23 at 00:15 +0200 Paul Hartmann wrote:
> >>>
> >>>> On 21.10.2017 17:49, Holger Mappt wrote:
> >>>>
> >>>>> Is the sonar the right place to see what is deprecated, i.e. what
> >>>>> needs to be changed? [1]
> >>>>> [1] https://josm.openstreetmap.de/sonar/project/issues?id=josm-p
> >>>>> lugins&resolved=false&rules=squid%3ACallToDeprecatedMethod
> >>>>>
> >>>>
> >>>> Possible, but the normal way would be to have the java compiler output
> >>>> deprecation warnings (use compiler option -Xlint:deprecation for
> javac to
> >>>> see details).
> >>>>
> >>>
> >>> The trick is to call "ant clean" before "ant", otherwise the
> deprecation
> >>> messages are not shown. Option -Xlint:deprecation is on by default if
> >>> ../build-common.xml is imported from build.xml.
> >>>
> >>> Thanks,
> >>> Holger
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
>

Reply via email to