-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic extensions reloading #377
Dynamic extensions reloading #377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API changes LGTM!
It took me several tries to git checkout "fix/278-Dynamic-extensions-reloading-\`IPlugindeactivate\`-\`ApplicationregisterPlugin\`-and-\`ApplicationdeactivatePlugin\`-proposal" |
I opened a PR against your fork which contains some of the review comments I made above and a few other changes. I didn't want to push directly on your branch in case you are in the middle of something or in case you disagree. |
autogenerated name from issue title... sorry about that
Thanks a lot for the review and the commit to improve this PR. I have only one blocking comment about your PR regarding not using sequential deactivation of the plugins: https://github.com/fcollonval/lumino/pull/5/files#r956955307 |
…ollonval's explanation re: newly deactivated services
Thank you! |
@meeseeksdev please backport to 1.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
I won't backport it because |
So for reference this seems to have been backported anyway in #485? |
Fixes #278
Code changes
There are three additions to the API :
Application.unregisterPlugin()
method to remove the plugin from the plugin map and complement the existingregisterPlugin()
deactivate
method which plugins may decide to implement. If it is provided, it should undo all the changes theactivate
method made, including removing the added commands, menus, etc. to complement the currentactivate()
method.Application.deactivatePlugin
method to call thedeactivate
method on the plugin and all of it dependantsThe
unregisterPlugin
signature is:deactivatePlugin
reject if plugin or one of its dependents does not havedeactivate()
method:It is up to plugin authors to adopt the
deactivate
method. This is a backwards-compatible change.The signature of
deactivate
is:Side effect I replace the use of objects by mapping because deleting a object key in JS is famous to reduce performance.