Open DrewNaylor opened 3 years ago
Maybe allowing alternative search functionality like fuzzy search (got the idea from a GNOME Shell extension that allows fuzzy search) would be useful. This would involve sending the search term and the package list to the active search plugin.
Plugins allowing alternate views for things like installed packages would be really useful, actually. I'd have to figure out a way to get a list of plugins that are meant for getting the list of installed packages when you click "View>Installed packages..." and put them in the Options window list. They could be added to the bottom and I'd store their assembly name so I can switch the desired one based on something in the config file like "Plugin: fancyinstalledpkglist". I'd then know a plugin is desired to be loaded, so I'd remove the "Plugin: " part and use the rest to start the right plugin on clicking the menu item.
If for some reason we can't run the plugin when doing something that would activate it, there should be a debugging option somewhere that changes between using the default action and displaying a messagebox with error details that might be useful for plugin developers. Maybe this should be done by not handling exceptions in the debugging mode so there's a bunch of stuff available.
Of course, with all of these there'd probably have to be a menu with items for each plugin. These menus would have submenus for (where available) the About and Options for each one, kinda like what Notepad++ does. A plugin manager would be rather important, so maybe it could be done as a generic plugin manager for .NET/.NET Framework apps using the plugin thing it allows for. Not sure if the Notepad++ one would be usable in my situation or if it would be easy to modify, since it has a plugin downloader and stuff, but I'll look at it.
Could probably use VS-MEF, as it's apparently the newest iteration of MEF and supposed to be the fastest when caching the list of plugins being used or something: https://www.nuget.org/packages/Microsoft.VisualStudio.Composition
I also read that it's thread-safe, whereas MEF1 (.NET-bundled MEF) and MEF2 (the one meant for webapps) aren't.
Should probably restrict the ability to load and use plugins/extensions to when we're running from Program Files/Program Files (x86), like Notepad++. Not sure how to handle portable installs, if anyone decides to make one.
After getting the package list, they could do things like load the selected package and show its homepage or display a window with available versions before those features are ready. There could be other things that people could think of as well, or maybe even support for other backends could be added if the plugin system were to become powerful enough. Possibly even a replacement for winget.exe on systems that don't support it? Or maybe even a system where reviews are loaded from sites like Softpedia or Wikipedia articles are displayed for each package.