feat: add plugin architecture with bidirectional clip sync#150
Merged
Conversation
Add extensible plugin system with GPL plugin exception clause: - SharpFM.Plugin contract library (IPanelPlugin, IPluginHost, IClipEditor) - Plugin discovery/loading from plugins/ directory - Plugin Manager UI for install/remove - Keyboard shortcut registration for plugins Introduce IClipEditor abstraction for clip-type-agnostic bidirectional sync between structured editors and plugins: - ScriptClipEditor, TableClipEditor, FallbackXmlEditor implementations - Generation counter prevents editor↔host sync loops - Origin tagging on ClipContentChanged enables multi-plugin coordination - Debounced change detection (500ms) for all editor types Add FmField INotifyPropertyChanged for live table editor tracking. Refactor ClipViewModel to delegate all sync to IClipEditor. Include two bundled plugins: - Clip Inspector (sample/demo plugin) - XML Viewer (replaces built-in XML window, Ctrl+Shift+X)
Flatten File menu (no nested New/Save submenus), add Edit menu for clipboard operations, replace View with dedicated Plugins menu. Move version display from menu bar to status bar. Add PluginMenuAction API so plugins can register custom menu items. Plugins with no custom actions show as a flat toggle item; plugins with actions get a submenu with Toggle Panel plus their custom entries.
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.
Summary
IClipEditorabstraction for clip-type-agnostic bidirectional sync between structured editors and pluginsPlugin Architecture
SharpFM.Plugincontract library:IPanelPlugin,IPluginHost,IClipEditor,PluginKeyBinding,PluginMenuActionplugins/directory at runtimeBidirectional Sync
IClipEditorinterface withScriptClipEditor,TableClipEditor,FallbackXmlEditorimplementationsClipContentChangedevents enables multi-plugin coordinationFmFieldnow implementsINotifyPropertyChangedfor live table editor trackingFromXmluses diff/patch to preserve UI state (selection, scroll)Menu Reorganization
Test plan
dotnet test)plugins/directory