56 void ReloadPlugins( std::optional<wxString> aDirectoryToScan = std::nullopt,
57 std::shared_ptr<REPORTER> aReporter =
nullptr );
69 std::shared_ptr<REPORTER> aReporter =
nullptr );
82 int InvokeActionSync(
const wxString& aIdentifier, std::vector<wxString> aExtraArgs,
83 wxString* aStdout =
nullptr, wxString* aStderr =
nullptr,
84 std::shared_ptr<REPORTER> aReporter =
nullptr );
88 std::optional<const PLUGIN_ACTION*>
GetAction(
const wxString& aIdentifier );
99 wxString pluginName(
const wxString& aIdentifier )
const;
101 void processPluginDependencies();
103 void processNextJob( wxCommandEvent& aEvent );
105 bool cancelPluginJobs(
const wxString& aIdentifier );
107 void recreateCancelledPlugin(
const wxString& aIdentifier );
109 int doInvokeAction(
const wxString& aIdentifier, std::vector<wxString> aExtraArgs,
110 bool aSync =
false, wxString* aStdout =
nullptr,
111 wxString* aStderr =
nullptr,
112 std::shared_ptr<REPORTER> aReporter =
nullptr );
const KICOMMON_API wxEventTypeTag< wxCommandEvent > EDA_EVT_PLUGIN_AVAILABILITY_CHANGED
Notifies other parts of KiCad when plugin availability changes.
const KICOMMON_API wxEventTypeTag< wxCommandEvent > EDA_EVT_PLUGIN_MANAGER_JOB_FINISHED
Event used for marking async plugin setup tasks as done.
std::set< std::unique_ptr< API_PLUGIN >, CompareApiPluginIdentifiers > m_plugins
int InvokeActionSync(const wxString &aIdentifier, std::vector< wxString > aExtraArgs, wxString *aStdout=nullptr, wxString *aStderr=nullptr, std::shared_ptr< REPORTER > aReporter=nullptr)
Invokes an action synchronously, capturing its output.
bool RecreatePluginEnvironment(const wxString &aIdentifier)
Removes the given plugin's virtual environment (if any) and schedules a new one to be created with th...
void ReloadPlugins(std::optional< wxString > aDirectoryToScan=std::nullopt, std::shared_ptr< REPORTER > aReporter=nullptr)
Clears the loaded plugins and actions and re-scans the filesystem to register new ones.
std::map< wxString, wxString > m_environmentCache
Map of plugin identifier to a path for the plugin's virtual environment, if it has one.
void HandlePythonInterpreterChanged()
std::shared_ptr< REPORTER > m_reloadReporter
void InvokeAction(const wxString &aIdentifier, std::shared_ptr< REPORTER > aReporter=nullptr)
std::set< wxString > m_cancelledPlugins
Plugins whose setup jobs were cancelled and need their environment recreated.
std::unique_ptr< JSON_SCHEMA_VALIDATOR > m_schema_validator
std::vector< const PLUGIN_ACTION * > GetActionsForScope(PLUGIN_ACTION_SCOPE aScope)
std::map< FRAME_T, std::map< int, wxString > > m_menuBindings
Map of menu wx item id to action identifier, per frame.
std::map< int, wxString > & ButtonBindings(FRAME_T aFrame)
std::shared_ptr< REPORTER > GetReporter()
std::map< wxString, const API_PLUGIN * > m_pluginsCache
std::optional< const PLUGIN_ACTION * > GetAction(const wxString &aIdentifier)
std::map< FRAME_T, std::map< int, wxString > > m_buttonBindings
Map of button wx item id to action identifier, per frame.
std::set< wxString > m_readyPlugins
std::map< wxString, long > m_runningPids
Map of plugin identifier to the pid of its currently-running setup process, if any.
std::map< wxString, const PLUGIN_ACTION * > m_actionsCache
API_PLUGIN_MANAGER(wxEvtHandler *aParent)
std::set< wxString > m_busyPlugins
std::map< int, wxString > & MenuBindings(FRAME_T aFrame)
A pure virtual class used to derive REPORTER objects from.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Comparison functor for ensuring API_PLUGINs have unique identifiers.