How to start an application in background IDEA via plugin Follow
Answered
I'm starting a Java application via plugin, if IDEA is running in background, the following lines:
DumbService dumbService = DumbService.getInstance(project);
dumbService.smartInvokeLater(() -> SofaUtils.startApplication(project, DefaultRunExecutor.getRunExecutorInstance()));
will not be executed after a long waiting, is there any solution to start an application running IntelliJ IDEA in background?
Please sign in to leave a comment.
Hello:
I find your question interesting.
Can you give more detail about running in the background.
You mean that IDEA is not the active application and you only need to select it to bring it to the front.
Or if it's on windows it's running on another desktop.
Or idea runs completely in the background using X forwarding
running in background means idea is started in projector mode(or headerless?) on a linux server, I hope the application can be started by a plugin no matter the projector client is started or not
Please see https://plugins.jetbrains.com/docs/intellij/plugin-components.html#application-startup and following sections on how to automatically invoke code on application/project open.