You can or add it programmatically, or just put files under the .idea/runConfigurations
directory (the easiest way).
To add programmatically:
RunManagerImpl manager = RunManagerImpl.getInstanceImpl(project)
RunnerAndConfigurationSettingsImpl settings = new RunnerAndConfigurationSettingsImpl(manager);
// data it is something like JDOMUtil.load(file)
settings.readExternal(data)
manager.add(settings, false)
I didn't test this code, but should be like this.
More easy and robust way will be in the 2017.2.
Hi, thank you for this helpful code.
Can I ask you if this is still up to date for IntelliJ version 2019.1.3 (CE) or what the code for this robust way is?
Thanks.