I created a run configuration for my plugin, implemented a RunConfigurationProducer and everything else that is needed to invoke my run action in the context menu when I right-click in a file.
This works fine, however I noticed that many times it takes quite long before my action appears as one of the choices in the context menu. After I restart Idea I have to right click a couple of times until my option appears between the others. And also I have noticed that even when it is finally there, it sometimes happens when I don't use the context menu for a long time, that my action has disappeared again. Then it again takes a few right clicks before it's back.
My RunConfigurationProducer does not contain any complex initialisation logic so the slow appearing must come from somewhere else. Do you know how I could make my action appear faster in the context menu after starting IntelliJ?