53 void ReloadPlugins( std::optional<wxString> aDirectoryToScan = std::nullopt );
69 int InvokeActionSync(
const wxString& aIdentifier, std::vector<wxString> aExtraArgs,
70 wxString* aStdout =
nullptr, wxString* aStderr =
nullptr );
74 std::optional<const PLUGIN_ACTION*>
GetAction(
const wxString& aIdentifier );
83 void processPluginDependencies();
85 void processNextJob( wxCommandEvent& aEvent );
87 int doInvokeAction(
const wxString& aIdentifier, std::vector<wxString> aExtraArgs,
88 bool aSync =
false, wxString* aStdout =
nullptr,
89 wxString* aStderr =
nullptr );
wxDECLARE_EVENT(EDA_EVT_PLUGIN_MANAGER_JOB_FINISHED, wxCommandEvent)
Internal event used for handling async tasks.
const KICOMMON_API wxEventTypeTag< wxCommandEvent > EDA_EVT_PLUGIN_AVAILABILITY_CHANGED
Notifies other parts of KiCad when plugin availability changes.
std::set< std::unique_ptr< API_PLUGIN >, CompareApiPluginIdentifiers > m_plugins
std::map< int, wxString > & MenuBindings()
std::map< int, wxString > & ButtonBindings()
std::map< wxString, wxString > m_environmentCache
Map of plugin identifier to a path for the plugin's virtual environment, if it has one.
int InvokeActionSync(const wxString &aIdentifier, std::vector< wxString > aExtraArgs, wxString *aStdout=nullptr, wxString *aStderr=nullptr)
Invokes an action synchronously, capturing its output.
std::unique_ptr< JSON_SCHEMA_VALIDATOR > m_schema_validator
std::vector< const PLUGIN_ACTION * > GetActionsForScope(PLUGIN_ACTION_SCOPE aScope)
std::map< int, wxString > m_menuBindings
Map of menu wx item id to action identifier.
std::map< int, wxString > m_buttonBindings
Map of button wx item id to action identifier.
void RecreatePluginEnvironment(const wxString &aIdentifier)
std::map< wxString, const API_PLUGIN * > m_pluginsCache
std::optional< const PLUGIN_ACTION * > GetAction(const wxString &aIdentifier)
std::set< wxString > m_readyPlugins
void ReloadPlugins(std::optional< wxString > aDirectoryToScan=std::nullopt)
Clears the loaded plugins and actions and re-scans the filesystem to register new ones.
std::map< wxString, const PLUGIN_ACTION * > m_actionsCache
void InvokeAction(const wxString &aIdentifier)
API_PLUGIN_MANAGER(wxEvtHandler *aParent)
std::set< wxString > m_busyPlugins
Comparison functor for ensuring API_PLUGINs have unique identifiers.