Looking for a replacement API for ExecutorRegistryImpl.RunnerHelper

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:

  1. 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#selectedConfiguration but it’s still not the same.

  2. RunToolbarProcessData#RW_MAIN_CONFIGURATION_ID

    This is set by RunToolbarProcessData.Companion#prepareBaseSettingCustomization and seems to be read only in RunToolbarSlotManager#addNewProcess. If I’m reading it correctly, it relates only to CompoundRunConfigurations which I’m not using in my plugin.

    Given that RunnerHelper.run is 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 by prepareBaseSettingCustomization?

Thanks for any pointers!