You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
I’m not sure how much you want to focus on general good development practices…
But when I see the “Print file path” example in Context Menus I have the urge to refactor to remove the duplicated code… For lots of reasons, including foreseeing the inevitable future bug-fix or new feature where the two accidentally become inconsistent.
The current code is good from an explanatory perspective, though… So I wonder whether it’s worth a second example that shows doing the same thing, but having the common code moved to something like a local helper function - named so that it either creates the one menu item - or to add all the menu items, as the plugin grows.