Run and Debug (ExecutorAction) different configuration

Answered

Is it possible to point different configuration for Run and Debug (ExecutorAction) from "RunLineMarkerProvider". I need ability to use one configuration for Run and other for Debug automatically using plugin. Currently i use "RunLineMarkerProvider" to create editor run context menu. But it generates only one type of configuration for all menu actions.

0
3 comments

AFAIU you can provide two distinct RunLineMarkerContributor implementations, one for "run", one for "debug" and each returns distinct ExecutorAction/config to use via com.intellij.execution.lineMarker.RunLineMarkerContributor.Info

0

I did that previously, but how to tie debug action with specific "ApplicationConfigurationProducer"? If i create one more "ApplicationConfigurationProducer" it creates two sub actions from each configuration for all menu items, which is not what i want.

final AnAction[] actions = ExecutorAction.getActions();
var myAction = new AnAction[]{actions[1]};
return new Info(icon, myAction, element1 -> StringUtil.join(ContainerUtil.mapNotNull(myAction, action -> getText(action, element1)), "\n"));
0

Could you please share your full project to reproduce?

0

Please sign in to leave a comment.