I am writing a plugin to run tests for a custom test library.
My RunConfigurationProducer correctly creates a RunConfiguration from the context when the user clicks run on an individual test case.
However, if there is already a JUnit run configuration for this class then the junit configuration always takes preference.
If there is no junit configuration then it works fine.
I am overriding shouldReplace and isPreferredConfiguration (I have tried hardcoding these values to the 4 combinations of true/false).
I have also tried setting order="first" in the plugin xml.
No matter what I try, I cannot get intellij to pick the configuration created by my plugin instead of the junit one.