Does ProjectManager.getInstance().loadAndOpenProject(filepath); cancel headless mode Follow
Answered
Hello everyone,
I have an application i want to run in headless mode. For that i overrite the main function and the isHeadless (to return true) function in the AppstarterService Extension point. in that main function i make the call ProjectManager.getInstance().loadAndOpenProject(filepath);
This opens the IDE Window. My question is, does the window open because i load the project or is there another reason for this behaviour?
Please sign in to leave a comment.
Use com.intellij.ide.impl.ProjectUtil#openOrImport(java.nio.file.Path), see existing ApplicationStarter implementations.
Do you happen to have any recommendations where to find some functioning examples?
There are usages in IntelliJ Community as well as in OSS Plugins use https://plugins.jetbrains.com/docs/intellij/explore-api.html as a guide
I wrote this little appstarter implementation for debug purposes.
if i leave the projectutil.openorimport out it executes in headless mode. as soon as i load the project the headless mode gets cancelt. Is there a way to still remain in headless mode.
I allready checked with other plugin implementations and this test app is a copy of the MetricsReloaded appstarter who claim to have headless mode.