Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#11090 closed enhancement (fixed)

install and load plugins without restart

Reported by: bastiK Owned by: team
Priority: major Milestone: 15.02
Component: Core Version:
Keywords: plugin load restart Cc: skyper, olejorgenb, stoecker, lpechacek

Description (last modified by Klumbumbus)

It should be possible to install and load plugins without a restart of JOSM.

Status of Plugins

Attachments (0)

Change History (44)

comment:1 Changed 4 years ago by bastiK

In 8017/josm:

see #11090 - basic support for plugin loading at runtime.

This is still in testing stage. It will be announced on
the mailing list when plugin authors can start to adapt
their code.

comment:2 Changed 4 years ago by bastiK

In [o30952] - see ​#josm11090 - add Manifest property that indicates the plugin can load at runtime

comment:3 Changed 4 years ago by bastiK

In [o30953]: see ​#josm11090 - reverter plugin is ready for load at runtime

comment:4 Changed 4 years ago by bastiK

In 8020/josm:

see #11090 - make sure modifications to the current MapFrame are done when loading plugin at runtime

comment:5 Changed 4 years ago by bastiK

In [o30955]: see ​​#josm11090 - building_tools: add Manifest property that indicates the plugin can load at runtime

comment:6 Changed 4 years ago by bastiK

In 8024/josm:

see #11090 - make sure plugin preference tab is shown after runtime load

comment:7 Changed 4 years ago by bastiK

In [o30958]: see ​​#josm11090 - utilsplugin2 is ready for load at runtime

comment:8 Changed 4 years ago by skyper

Cc: skyper added

comment:9 Changed 4 years ago by Klumbumbus

Milestone: 15.02

comment:10 Changed 4 years ago by bastiK

In 8029/josm:

see #11090 - new option for LayerChangeListener to get an initial
notification when the LayerChangeListener is added

comment:11 Changed 4 years ago by bastiK

In [o30962]: see ​​​#josm11090 - plugins ready for load at runtime:

OpeningHoursEditor, mirrored_download, photo_geotagging, photoadjust,
piclayer, roadsigns, simplifyarea, tag2link, turnrestrictions

comment:12 Changed 4 years ago by Don-vip

Ticket #6396 has been marked as a duplicate of this ticket.

comment:13 Changed 4 years ago by Don-vip

Cc: olejorgenb stoecker added

comment:14 Changed 4 years ago by Don-vip

Priority: normalmajor

comment:15 in reply to:  12 ; Changed 4 years ago by bastiK

Replying to Don-vip:

Ticket #6396 has been marked as a duplicate of this ticket.

#6396 is about reloading plugins at runtime, i.e. first unloading it and then loading it again. This is a much more ambitious project and beyond the scope of the current ticket. olejorgenb provided a patch that proves it is technically possible, but I think a lot more "boring" stuff would need to be done before it worked properly.

comment:16 Changed 4 years ago by bastiK

In 8030/josm:

see #11090 - refresh plugin info after download & before loading

comment:17 in reply to:  15 Changed 4 years ago by Don-vip

Replying to bastiK:

#6396 is about reloading plugins at runtime, i.e. first unloading it and then loading it again. This is a much more ambitious project and beyond the scope of the current ticket. olejorgenb provided a patch that proves it is technically possible, but I think a lot more "boring" stuff would need to be done before it worked properly.

OK :)

comment:18 Changed 4 years ago by Don-vip

Component: PluginCore
Keywords: plugin load restart added

comment:19 Changed 4 years ago by pwoelfel

Areaselector plugin has been updated to v1.9.0 on github.

Last edited 4 years ago by pwoelfel (previous) (diff)

comment:20 Changed 4 years ago by Klumbumbus

It would be nice if also the table at Plugins displays if the plugin supports "install without restart". With this more prominent display it would maybe push some plugin developpers to update their plugin.

comment:21 Changed 4 years ago by malcolmh

SeaMapEditor (smed) updated & tested. New version published.

comment:22 Changed 4 years ago by bastiK

In [8074]:
#11090 - do not load plugins unless depenencies can be loaded
(or are already loaded)

comment:23 Changed 4 years ago by Don-vip

I have some problems to make it work with opendata [o31004:31009]. I have a reentrant call to the EDT when the plugin is loaded at runtime and I'm not sure ho to fix it.

Last edited 4 years ago by Don-vip (previous) (diff)

comment:24 in reply to:  23 Changed 4 years ago by bastiK

Replying to Don-vip:

I have some problems to make it work with opendata [o31004:31009]. I have a reentrant call to the EDT when the plugin is loaded at runtime and I'm not sure ho to fix it.

The future.get() in ModuleHandler.loadLocallyAvailableModuleInformation() locks in combination with EventQueue.invokeAndWait(...) in PleaseWaitRunnable.doRealRun().

This has worked before, because the method was only called in main thread, but now the plugins are loaded in EDT. Possible fixes:

  • Spawn a background thread to call loadModules() in the OdPlugin constructor
  • Don't use PleaseWaitRunnable, but call ReadLocalModuleInformationTask.realRun() directly in ModuleHandler.loadLocallyAvailableModuleInformation()
  • Use continuation style like in, e.g. in PluginPreference.UpdateSelectedPluginsAction

comment:25 Changed 4 years ago by Mkyral

Hi,
Tracer, Tracer-testing and pointInfo plugins updated, tested and released.

The czechaddress is obsolete as we have working address import from Czech RUIAN database. I'll check the possibility of dropping of the plugin with the Czech community.

comment:26 Changed 4 years ago by Klumbumbus

Description: modified (diff)

comment:27 Changed 4 years ago by lpechacek

Cc: lpechacek added

comment:28 in reply to:  25 Changed 4 years ago by Don-vip

Replying to Mkyral:

I'll check the possibility of dropping of the plugin with the Czech community.

great! :)

comment:29 Changed 4 years ago by bastiK

In [o31021] - utilsplugin2 not working yet

comment:30 Changed 4 years ago by bastiK

In [o31023] - fixed utilsplugin2 for load without restart

comment:31 in reply to:  20 ; Changed 4 years ago by bastiK

Replying to Klumbumbus:

It would be nice if also the table at Plugins displays if the plugin supports "install without restart". With this more prominent display it would maybe push some plugin developpers to update their plugin.

Good idea, done!

comment:32 in reply to:  30 ; Changed 4 years ago by Don-vip

Replying to bastiK:

In [o31023] - fixed utilsplugin2 for load without restart

This should be commented better as it is not obvious when reading it, that installAdapters() must be called this way to avoid problems. I think anyone could accidentally revert this change.

comment:33 in reply to:  32 Changed 4 years ago by bastiK

Replying to Don-vip:

Replying to bastiK:

In [o31023] - fixed utilsplugin2 for load without restart

This should be commented better as it is not obvious when reading it, that installAdapters() must be called this way to avoid problems. I think anyone could accidentally revert this change.

Alright :) (In [o31026])

comment:34 Changed 4 years ago by rickmastfan67

Will doing all this work for making plugins to be loaded without a restart possibly help fix #6725?

comment:35 in reply to:  31 ; Changed 4 years ago by stoecker

Replying to bastiK:

Replying to Klumbumbus:

It would be nice if also the table at Plugins displays if the plugin supports "install without restart". With this more prominent display it would maybe push some plugin developpers to update their plugin.

Good idea, done!

Could you please use the old design method again? You new design of the tables wastes so much padding space, that the table becomes nearly unreadable even on my large screens.

comment:36 in reply to:  35 ; Changed 4 years ago by bastiK

Replying to stoecker:

Could you please use the old design method again? You new design of the tables wastes so much padding space, that the table becomes nearly unreadable even on my large screens.

I don't see how you can change the background color in the simple syntax.

pipe style:

some
example

html style:

some

example

comment:37 in reply to:  34 Changed 4 years ago by bastiK

Replying to rickmastfan67:

Will doing all this work for making plugins to be loaded without a restart possibly help fix #6725?

Nope, this is unrelated.

comment:38 in reply to:  36 Changed 4 years ago by stoecker

Replying to bastiK:

Replying to stoecker:

Could you please use the old design method again? You new design of the tables wastes so much padding space, that the table becomes nearly unreadable even on my large screens.

I don't see how you can change the background color in the simple syntax.

Use this trick:

http://trac-hacks.org/browser/translatedpagesmacro/0.11/translatedpages/translatedpages.py#L369
http://trac-hacks.org/browser/translatedpagesmacro/0.11/translatedpages/translatedpages.py#L445

Generate the table normal and change color with a regexp before passing the HTML back.

comment:39 Changed 4 years ago by bastiK

Should be fixed.

comment:40 in reply to:  39 Changed 4 years ago by stoecker

Replying to bastiK:

Should be fixed.

Fine. I also fixed the icon meta data a bit to say yes/no instead of a useless link :-)

comment:41 Changed 4 years ago by stoecker

Resolution: fixed
Status: newclosed

comment:42 Changed 4 years ago by anonymous

Plugin scripting - done.

comment:43 Changed 4 years ago by anonymous

Plugin contourmerge - Done

comment:44 Changed 3 years ago by Rub21

Plugin ​tofix - Done!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.