Refresh run configurations from .idea/runConfigurations files
Answered
My plugin creates a file: .idea/runConfigurations/Main.xml, which is a run configuration:
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Main" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="run.Main" />
<module name="myModule" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
The problem is that the run configuration only shows up only after I restart Intellij IDEA. How can I refresh the run configurations programmatically?
Please sign in to leave a comment.
Please use proper API to create run configuration com.intellij.execution.RunManager
https://jetbrains.org/intellij/sdk/docs/basics/run_configurations.html
Any way to do this more simply?
Tobias Feil What exactly do you mean with "more simply"?
Without using Java and having to write tons of code as shown in the example. I have a simple Python script that creates my run configurations, the only problem is that as of now I have to manually close and reopen the IDE so it will recognize the changes. It would be great it I didn't have to do this
While this might work by reopening the project, it's still not recommended to create any configuration files bypassing the regular API that manage them.