How to intercept Run/Debug operations and get/set the run configrations?

How to intercept Run/Debug operations and get/set the run configrations? 

MessageBus messageBus = project.getMessageBus();
MessageBusConnection connection = messageBus.connect();
connection.subscribe(? ? ?);
评论操作 固定链接
正式评论

See com.intellij.execution.RunManagerListener and com.intellij.execution.ExecutionManager#EXECUTION_TOPIC

请先登录再写评论。