Hi,
In a plugin I’ve been using com.intellij.execution.ExecutorRegistryImpl.RunnerHelper#run (I inherited it this way), however ExecutorRegistryImpl is internal, and I’d like to replace it with a (near) equivalent solution. Unfortunately I haven’t found a proper, ideally drop-in replacement for it.
Context: I call RunnerHelper.run from a DumbAwareAction that is placed on the editor’s floating toolbar.
Now I’ve been able to come up with a simplified logic for RunnerHelper.run()/runSubProcess(), however there are two more APIs that are internal that I still have to handle somehow if I take this route:
-
RunConfigurationStartHistory.getInstance(...).register(...)I see that it places the run configuration being executed at the top of the Recent Configurations section in the Run toolbar popup without setting that run config as selected.
I didn’t find any public API that could achieve the same reordering. The closest is setting the run config as selected via
RunManager#selectedConfigurationbut it’s still not the same. -
RunToolbarProcessData#RW_MAIN_CONFIGURATION_IDThis is set by
RunToolbarProcessData.Companion#prepareBaseSettingCustomizationand seems to be read only inRunToolbarSlotManager#addNewProcess. If I’m reading it correctly, it relates only toCompoundRunConfigurations which I’m not using in my plugin.Given that
RunnerHelper.runis executed only via a floating toolbar action in my plugin, and that action’s logic doesn’t involve compound run configurations, should it be safe to omit the environment customization byprepareBaseSettingCustomization?
Thanks for any pointers!