Run write action when IDE is backgrounded

已回答

I want to run some clean up task that requires write action. Since i don't want to block the user, I would like to run it when the user has backgrounded IntelliJ or moved to a different application. Is there a way to get updated on that type of event? 

Thanks! 

0

See listener com.intellij.openapi.application.ApplicationActivationListener, https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_listeners.html on how to register

0
Avatar
Permanently deleted user

Thank you Yann Cebron!

0

请先登录再写评论。