Start a Run Configuration from code
I have a RunConfiguration and I'd like to start it by clicking a button in a toolwindow that I created.
By looking at the code, I understood that first I should set the configuration as selected, e.g.
final RunnerAndConfigurationSettings settings = ...// here get the runner and conf settings
final RunManager runManager = RunManager.getInstance(project);
runManager.setSelectedConfiguration(settings);
Then, I wonder how I can start the Run Configuration that I get from
final RunConfiguration runConfiguration = settings.getConfiguration();
Any suggestion?
Please sign in to leave a comment.
See com.intellij.execution.runners.ExecutionUtil#runConfiguration()
Would it work something like: