Make most class in Explorer plugin become static class#318
Merged
jjw24 merged 2 commits intoFlow-Launcher:devfrom Feb 2, 2021
Merged
Make most class in Explorer plugin become static class#318jjw24 merged 2 commits intoFlow-Launcher:devfrom
jjw24 merged 2 commits intoFlow-Launcher:devfrom
Conversation
Member
|
well for now it doesnt keep state, but later on it may such as allowing users to select how many results to display from index search. What do you mean by there are multiple duplicate instances? |
Member
Author
|
It seems that most class in explorer plugin contains an instance for |
Member
Author
|
Even if we may need to check how much results will be listed, most of the class still doesn't have to be instance class. The only class that may store the state maybe ResultManager (store a pointer to pluginAPI), and the queryconstructor (to store how much result to display). |
jjw24
previously approved these changes
Feb 2, 2021
jjw24
approved these changes
Feb 2, 2021
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.
Make most helper class in Explorer become static class.
I am not sure why by design, they are instance class (or a least singleton), and there are multiple duplicate instances. This pr makes them become static class because most of them don't save any information (except for ResultManager, which contains the PluginInitContext to change query), but just be used as a group of methods.