PluginTriggerAction: copy enabled status in copy constructor - #1326
Open
alxvth wants to merge 1 commit into
Open
PluginTriggerAction: copy enabled status in copy constructor#1326alxvth wants to merge 1 commit into
alxvth wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We should copy the "enabled" status in the copy constructor of
PluginTriggerAction.There are plugins that should be not opened via the main menu bar, e.g. the JupyterLauncher, but there might be other cases, e.g. when a view plugin must be opened with a dataset.
Currently, afaik, all view plugins are listed in the menu and the"enabled" status is not respected.
New possibility, e.g. with ManiVaultStudio/JupyterPlugin#71:

There are more members of the
PluginTriggerActionwhich are not copied in the copy-constructor, but that might be intentional?Related: #1327
Some additional context:
The JupyterLauncher plugin factory sets the maximum number of plugins instances to 1. In
PluginManager::privateRequestPlugin, there is a check forpluginFactory->mayProduce()which returns_numberOfInstances < _maximumNumberOfInstances, and will throw if true. This means, currently, when first opening the JupyterLauncher via the view menu, nothing happens since the plugins want to be opened via the status bar, and the second opening causes a crash.Alternatively, instead of throwing when
mayProduce()returns true, the respective plugin trigger action could be disabled.